summaryrefslogtreecommitdiff
path: root/usr.sbin/dvmrpd/igmp.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2023-06-26 10:08:57 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2023-06-26 10:08:57 +0000
commitd196d42b33908899df8daa4e7e12a1fb59ebcbbd (patch)
treeac492b1e725d27ddb0139bbbbfc08c028d629b9d /usr.sbin/dvmrpd/igmp.c
parent3592dab1a22367ce4e384d923b74dee41fdab3ff (diff)
Update and refactor dvrmpd to use the new ibu API.
Do the checksum calculation in send_packet() instead of doing it all over the place. This way the fixup only happens in one place. OK tb@
Diffstat (limited to 'usr.sbin/dvmrpd/igmp.c')
-rw-r--r--usr.sbin/dvmrpd/igmp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/dvmrpd/igmp.c b/usr.sbin/dvmrpd/igmp.c
index 90196710250..c1c2b93c10d 100644
--- a/usr.sbin/dvmrpd/igmp.c
+++ b/usr.sbin/dvmrpd/igmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: igmp.c,v 1.4 2015/12/07 19:14:49 mmcc Exp $ */
+/* $OpenBSD: igmp.c,v 1.5 2023/06/26 10:08:56 claudio Exp $ */
/*
* Copyright (c) 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -73,9 +73,6 @@ send_igmp_query(struct iface *iface, struct group *group)
igmp_hdr.max_resp_time = iface->last_member_query_interval;
}
- /* update chksum */
- igmp_hdr.chksum = in_cksum(&igmp_hdr, sizeof(igmp_hdr));
-
ibuf_add(buf, &igmp_hdr, sizeof(igmp_hdr));
/* set destination address */
@@ -83,7 +80,7 @@ send_igmp_query(struct iface *iface, struct group *group)
dst.sin_len = sizeof(struct sockaddr_in);
inet_aton(AllSystems, &dst.sin_addr);
- ret = send_packet(iface, buf->buf, buf->wpos, &dst);
+ ret = send_packet(iface, buf, &dst);
ibuf_free(buf);
return (ret);
}