PERFORCE change 166383 for review
Ana Kukec
anchie at FreeBSD.org
Tue Jul 21 20:44:45 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=166383
Change 166383 by anchie at anchie_malimis on 2009/07/21 20:44:15
ND/SEND message is prepended to if_announcemsghdr.
Affected files ...
.. //depot/projects/soc2009/anchie_send/send_0.2/sendd/net.c#21 edit
Differences ...
==== //depot/projects/soc2009/anchie_send/send_0.2/sendd/net.c#21 (text+ko) ====
@@ -35,6 +35,8 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/param.h>
+#include <sys/mbuf.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <net/route.h>
@@ -168,6 +170,9 @@
rtm->rtm_addrs = 0;
rtm->rtm_index = pi->ifinfo->ifidx;
+ if (rtm->rtm_flags & M_MCAST)
+ DBG(&dbg_snd, "M_MCAST!");
+
if (send(sndsock, rtm, b->len, 0) < 0) {
DBG(&dbg_snd, "Failed to send routing message back to kernel.");
perror("Failed");
@@ -290,7 +295,10 @@
case RTM_SND_IN:
applog(LOG_ERR, "RTM_SND_IN");
/* n = RTM hdr + SEND message */
+#if 0
if (sbuff_pull(b, sizeof (struct rt_msghdr)) == NULL) {
+#endif
+ if (sbuff_pull(b, sizeof (struct if_announcemsghdr)) == NULL) {
DBG(&dbg_snd, "invalid pkt (not enough for rtm hedaer"); goto done;
}
More information about the p4-projects
mailing list