summaryrefslogtreecommitdiffstats
path: root/sys/i4b
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i4b')
-rw-r--r--sys/i4b/driver/i4b_ipr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/i4b/driver/i4b_ipr.c b/sys/i4b/driver/i4b_ipr.c
index 60d8a46..1309d73 100644
--- a/sys/i4b/driver/i4b_ipr.c
+++ b/sys/i4b/driver/i4b_ipr.c
@@ -272,7 +272,7 @@ i4biprattach(void *dummy)
if_attach(sc->sc_ifp);
- bpfattach(sc->sc_ifp, DLT_NULL, sizeof(u_int));
+ bpfattach(sc->sc_ifp, DLT_NULL, sizeof(u_int32_t));
}
}
@@ -288,12 +288,20 @@ i4biproutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
int s;
struct ifqueue *ifq;
struct ip *ip;
+ u_int32_t af;
s = SPLI4B();
sc = ifp->if_softc;
unit = ifp->if_dunit;
+ /* BPF writes need to be handled specially. */
+ if(dst->sa_family == AF_UNSPEC)
+ {
+ bcopy(dst->sa_data, &af, sizeof(af));
+ dst->sa_family = af;
+ }
+
/* check for IP */
if(dst->sa_family != AF_INET)
OpenPOWER on IntegriCloud