> 
> Hum ... the previous patch against bpf.c was the result of multiple test, thus
> it was _VERY_ ugly with useless lines of code... now the new one is cleaner :)
> (it's just aesthetic modifications but ... better for the eyes :p)
> 
> -- Aurelien


@!#~& *tired* here is the ghost patch ... sorry

-- Aurelien
--- sys/net/bpf.c       Tue Dec 24 23:26:49 2002
+++ sys/net/bpf.c       Tue Dec 24 23:13:14 2002
@@ -68,6 +68,8 @@
 #include <net/bpfdesc.h>
 
 #include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
 #include <netinet/if_ether.h>
 #include <sys/kernel.h>
 #include <sys/sysctl.h>
@@ -549,6 +551,7 @@
        int error;
        static struct sockaddr dst;
        int datlen;
+       struct ip *ip;
 
        if (d->bd_bif == 0)
                return (ENXIO);
@@ -572,6 +575,10 @@
 #ifdef MAC
        mac_create_mbuf_from_bpfdesc(d, m);
 #endif
+       if (dst.sa_family == AF_UNSPEC) {
+               ip = mtod(m, struct ip *);
+               ip->ip_len = htons(ip->ip_len);
+       }
 
        error = (*ifp->if_output)(ifp, m, &dst, (struct rtentry *)0);
        mtx_unlock(&Giant);

Attachment: msg49298/pgp00000.pgp
Description: PGP signature

Reply via email to