summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2018-12-17 23:42:47 +0000
committerdlg <dlg@openbsd.org>2018-12-17 23:42:47 +0000
commit25dfeb2bda1c3f58bd7e9e7d2275c31c52e80f74 (patch)
tree4c1d98d2d9d6b6fef2e44cf7a599d3ff18c458e2
parentIf something like ether_ioctl returns ENETRESET, don't let it bubble out. (diff)
downloadwireguard-openbsd-25dfeb2bda1c3f58bd7e9e7d2275c31c52e80f74.tar.xz
wireguard-openbsd-25dfeb2bda1c3f58bd7e9e7d2275c31c52e80f74.zip
Handle SIOCADDMULTI and SIOCDELMULTI as nops in ioctl code.
There's nothing underneath the tunnels that needs configuration, so there's no point in keepign track of configured multicast addresses. We will at least save a bit of memory.
-rw-r--r--sys/net/if_etherip.c6
-rw-r--r--sys/net/if_gre.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/net/if_etherip.c b/sys/net/if_etherip.c
index e12aed456c6..f36bd9e5967 100644
--- a/sys/net/if_etherip.c
+++ b/sys/net/if_etherip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_etherip.c,v 1.41 2018/12/17 23:08:36 dlg Exp $ */
+/* $OpenBSD: if_etherip.c,v 1.42 2018/12/17 23:42:47 dlg Exp $ */
/*
* Copyright (c) 2015 Kazuya GODA <goda@openbsd.org>
*
@@ -326,6 +326,10 @@ etherip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
break;
+ case SIOCADDMULTI:
+ case SIOCDELMULTI:
+ break;
+
default:
error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
break;
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 16c029a0472..c8472556194 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.142 2018/12/17 23:08:36 dlg Exp $ */
+/* $OpenBSD: if_gre.c,v 1.143 2018/12/17 23:42:47 dlg Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -2825,6 +2825,10 @@ nvgre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
nvgre_flush_map(sc);
break;
+ case SIOCADDMULTI:
+ case SIOCDELMULTI:
+ break;
+
default:
error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
break;
@@ -2971,6 +2975,10 @@ eoip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
ifr->ifr_hdrprio = sc->sc_tunnel.t_txhprio;
break;
+ case SIOCADDMULTI:
+ case SIOCDELMULTI:
+ break;
+
default:
error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
break;