Hi, while reading the changes in OpenBSD source code (hopefully to learn more), I've notice the usage of Uninitialized variable. Looks like the latest commit unintentionally removed the assignment line:

https://github.com/openbsd/src/commit/5c53b9324545b7febab2dcf52402199d72b231d3?diff=split#diff-3efc580dfa272b2173162f5950c92484R86

The following should bring back (the possibly) unwanted change. Hope it helps unless I missed something :-)

diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c
index 34fe7314d..487506301 100644
--- a/sys/netmpls/mpls_input.c
+++ b/sys/netmpls/mpls_input.c
@@ -83,6 +83,7 @@ mpls_input(struct ifnet *ifp, struct mbuf *m)
 #endif

        /* check and decrement TTL */
+       ttl = ntohl(shim->shim_label & MPLS_TTL_MASK);
        if (--ttl == 0) {
                /* TTL exceeded */
m = mpls_do_error(m, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0);

Reply via email to