Page MenuHomeFreeBSD

D32356.diff
No OneTemporary

D32356.diff

diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -1836,6 +1836,7 @@
struct lagg_snd_tag *lst;
struct lagg_port *lp;
struct ifnet *lp_ifp;
+ struct m_snd_tag *mst;
int error;
switch (params->hdr.type) {
@@ -1851,6 +1852,10 @@
case IF_SND_TAG_TYPE_TLS:
sw = &lagg_snd_tag_tls_sw;
break;
+ case IF_SND_TAG_TYPE_TLS_RX:
+ /* Return tag from port interface directly. */
+ sw = NULL;
+ break;
#ifdef RATELIMIT
case IF_SND_TAG_TYPE_TLS_RATE_LIMIT:
sw = &lagg_snd_tag_tls_rl_sw;
@@ -1876,22 +1881,30 @@
if_ref(lp_ifp);
NET_EPOCH_EXIT(et);
- lst = malloc(sizeof(*lst), M_LAGG, M_NOWAIT);
- if (lst == NULL) {
- if_rele(lp_ifp);
- return (ENOMEM);
- }
+ if (sw != NULL) {
+ lst = malloc(sizeof(*lst), M_LAGG, M_NOWAIT);
+ if (lst == NULL) {
+ if_rele(lp_ifp);
+ return (ENOMEM);
+ }
+ } else
+ lst = NULL;
- error = m_snd_tag_alloc(lp_ifp, params, &lst->tag);
+ error = m_snd_tag_alloc(lp_ifp, params, &mst);
if_rele(lp_ifp);
if (error) {
free(lst, M_LAGG);
return (error);
}
- m_snd_tag_init(&lst->com, ifp, sw);
+ if (sw != NULL) {
+ m_snd_tag_init(&lst->com, ifp, sw);
+ lst->tag = mst;
+
+ *ppmt = &lst->com;
+ } else
+ *ppmt = mst;
- *ppmt = &lst->com;
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 12, 8:57 AM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15764531
Default Alt Text
D32356.diff (1 KB)

Event Timeline