diff options
author | 2018-12-12 05:38:26 +0000 | |
---|---|---|
committer | 2018-12-12 05:38:26 +0000 | |
commit | b1781fe2e8eeb37bdf466ca34ea6d62b5fcfcac6 (patch) | |
tree | 4172f754a7bb6367ef7fb50024c9352354afe6b9 | |
parent | Fix regress test. The rule optimizer changes output since all the (diff) | |
download | wireguard-openbsd-b1781fe2e8eeb37bdf466ca34ea6d62b5fcfcac6.tar.xz wireguard-openbsd-b1781fe2e8eeb37bdf466ca34ea6d62b5fcfcac6.zip |
allow ethernet interfaces to provide a custom if_output routine.
this will be mostly useful for virtual interfaces like vlan and
etherip, where they can bypass queueing on an ifq, and instead
encapsulate in on multiple cpus concurrently and push the packet
onto the next layer directly.
ok visa@
-rw-r--r-- | sys/net/if_ethersubr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 68a2b265b26..85beff1c9db 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ethersubr.c,v 1.254 2018/12/11 01:27:08 dlg Exp $ */ +/* $OpenBSD: if_ethersubr.c,v 1.255 2018/12/12 05:38:26 dlg Exp $ */ /* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */ /* @@ -510,7 +510,8 @@ ether_ifattach(struct ifnet *ifp) ifp->if_addrlen = ETHER_ADDR_LEN; ifp->if_hdrlen = ETHER_HDR_LEN; ifp->if_mtu = ETHERMTU; - ifp->if_output = ether_output; + if (ifp->if_output == NULL) + ifp->if_output = ether_output; ifp->if_rtrequest = ether_rtrequest; if_ih_insert(ifp, ether_input, NULL); |