diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-10-18 03:01:19 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-10-18 03:01:19 +0000 |
commit | 19daf9fa36b26f398c3e5a1d70668048f5a08344 (patch) | |
tree | a13cd189830802f6c8682f879d84f6f2163a546b /sys/net/if_gre.c | |
parent | aabb6fbeb6a84224441d3e75756ebd7e0cd23ff6 (diff) |
provide a default case for all switch statements handling address families
from markus@
Diffstat (limited to 'sys/net/if_gre.c')
-rw-r--r-- | sys/net/if_gre.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 4b8d9d4dc8c..07ac87e3ef8 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.129 2018/10/18 01:58:15 dlg Exp $ */ +/* $OpenBSD: if_gre.c,v 1.130 2018/10/18 03:01:18 dlg Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -2896,6 +2896,9 @@ gre_keepalive_send(void *arg) proto = htons(ETHERTYPE_IPV6); break; #endif + default: + m_freem(m); + return; } /* @@ -3172,6 +3175,8 @@ mgre_up(struct mgre_softc *sc) hlen = sizeof(struct ip6_hdr); break; #endif /* INET6 */ + default: + unhandled_af(sc->sc_tunnel.t_af); } hlen += sizeof(struct gre_header); @@ -3333,6 +3338,8 @@ delmulti: in6_delmulti(inm); break; #endif + default: + unhandled_af(tunnel->t_af); } remove_ucast: RBT_REMOVE(nvgre_ucast_tree, &nvgre_ucast_tree, sc); @@ -3382,6 +3389,8 @@ nvgre_down(struct nvgre_softc *sc) in6_delmulti(sc->sc_inm); break; #endif + default: + unhandled_af(tunnel->t_af); } RBT_REMOVE(nvgre_ucast_tree, &nvgre_ucast_tree, sc); |