aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2019-02-13 14:57:59 +0000
committerRandall Stewart <rrs@FreeBSD.org>2019-02-13 14:57:59 +0000
commitfa91f845028358800c1a848b68fff7c7822ac6fb (patch)
treeca161d97dd452806548fa836865f549ed02d5b9e /sys/net/if_vlan.c
parent2a021abd9eb8c5411b778b8fa672672ea38bce10 (diff)
downloadsrc-fa91f845028358800c1a848b68fff7c7822ac6fb.tar.gz
src-fa91f845028358800c1a848b68fff7c7822ac6fb.zip
This commit adds the missing release mechanism for the
ratelimiting code. The two modules (lagg and vlan) did have allocation routines, and even though they are indirect (and vector down to the underlying interfaces) they both need to have a free routine (that also vectors down to the actual interface). Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D19032
Notes
Notes: svn path=/head/; revision=344099
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 535ce8cf7dcb..cf8b4ff1790a 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -267,6 +267,7 @@ static int vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr);
#ifdef RATELIMIT
static int vlan_snd_tag_alloc(struct ifnet *,
union if_snd_tag_alloc_params *, struct m_snd_tag **);
+static void vlan_snd_tag_free(struct m_snd_tag *);
#endif
static void vlan_qflush(struct ifnet *ifp);
static int vlan_setflag(struct ifnet *ifp, int flag, int status,
@@ -1047,6 +1048,7 @@ vlan_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
ifp->if_ioctl = vlan_ioctl;
#ifdef RATELIMIT
ifp->if_snd_tag_alloc = vlan_snd_tag_alloc;
+ ifp->if_snd_tag_free = vlan_snd_tag_free;
#endif
ifp->if_flags = VLAN_IFFLAGS;
ether_ifattach(ifp, eaddr);
@@ -1934,4 +1936,10 @@ vlan_snd_tag_alloc(struct ifnet *ifp,
/* forward allocation request */
return (ifp->if_snd_tag_alloc(ifp, params, ppmt));
}
+
+static void
+vlan_snd_tag_free(struct m_snd_tag *tag)
+{
+ tag->ifp->if_snd_tag_free(tag);
+}
#endif