diff options
author | 2015-09-10 16:41:30 +0000 | |
---|---|---|
committer | 2015-09-10 16:41:30 +0000 | |
commit | 651987cba2f5dacbfe3b4fe61bbfb9cbe9fd08cb (patch) | |
tree | 9569df38d4383b64e624d7f8063069709cacc8fe /sys/netinet/ip_carp.c | |
parent | Kill in6_ifstat_inc() and associated per-ifp storage. (diff) | |
download | wireguard-openbsd-651987cba2f5dacbfe3b4fe61bbfb9cbe9fd08cb.tar.xz wireguard-openbsd-651987cba2f5dacbfe3b4fe61bbfb9cbe9fd08cb.zip |
pass a cookie argument to interface input handlers that can be used
to pass additional context or transient data with the similar life
time.
ok mpi, suggestions, hand holding and ok from dlg
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 142d41f7661..96b44ff497d 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.266 2015/09/10 15:09:16 dlg Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.267 2015/09/10 16:41:30 mikeb Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -193,7 +193,7 @@ void carp_hmac_generate(struct carp_vhost_entry *, u_int32_t *, unsigned char *, u_int8_t); int carp_hmac_verify(struct carp_vhost_entry *, u_int32_t *, unsigned char *); -int carp_input(struct ifnet *ifp, struct mbuf *); +int carp_input(struct ifnet *ifp, struct mbuf *, void *); void carp_proto_input_c(struct ifnet *ifp, struct mbuf *, struct carp_header *, int, sa_family_t); void carp_proto_input_if(struct ifnet *, struct mbuf *, int); @@ -883,7 +883,7 @@ carpdetach(struct carp_softc *sc) return; /* Restore previous input handler. */ - if_ih_remove(ifp, carp_input); + if_ih_remove(ifp, carp_input, NULL); s = splnet(); if (sc->lh_cookie != NULL) @@ -1430,7 +1430,7 @@ carp_ourether(void *v, u_int8_t *ena) } int -carp_input(struct ifnet *ifp0, struct mbuf *m) +carp_input(struct ifnet *ifp0, struct mbuf *m, void *cookie) { struct carp_softc *sc; struct ether_header *eh; @@ -1741,7 +1741,7 @@ carp_set_ifp(struct carp_softc *sc, struct ifnet *ifp) carp_carpdev_state, ifp); /* Change input handler of the physical interface. */ - if_ih_insert(ifp, carp_input); + if_ih_insert(ifp, carp_input, NULL); s = splnet(); carp_carpdev_state(ifp); |