Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Fix "MPLS handled this" detection logic in the rump ...



details:   https://anonhg.NetBSD.org/src/rev/20b0d1995bd3
branches:  trunk
changeset: 369868:20b0d1995bd3
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 04 23:34:51 2022 +0000

description:
Fix "MPLS handled this" detection logic in the rump environment.

diffstat:

 sys/net/if_loop.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r d1c9359644aa -r 20b0d1995bd3 sys/net/if_loop.c
--- a/sys/net/if_loop.c Sun Sep 04 22:55:00 2022 +0000
+++ b/sys/net/if_loop.c Sun Sep 04 23:34:51 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_loop.c,v 1.117 2022/09/03 02:47:59 thorpej Exp $    */
+/*     $NetBSD: if_loop.c,v 1.118 2022/09/04 23:34:51 thorpej Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.117 2022/09/03 02:47:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.118 2022/09/04 23:34:51 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -297,16 +297,18 @@
        m_tag_delete_chain(m);
 
 #ifdef MPLS
+       bool is_mpls = false;
        if (rt != NULL && rt_gettag(rt) != NULL &&
            rt_gettag(rt)->sa_family == AF_MPLS &&
            (m->m_flags & (M_MCAST | M_BCAST)) == 0) {
                union mpls_shim msh;
                msh.s_addr = MPLS_GETSADDR(rt);
                if (msh.shim.label != MPLS_LABEL_IMPLNULL) {
+                       is_mpls = true;
                        pktq = mpls_pktq;
                }
        }
-       if (pktq != mpls_pktq)
+       if (!is_mpls)
 #endif
        switch (dst->sa_family) {
 



Home | Main Index | Thread Index | Old Index