From: dlg Date: Wed, 10 Jan 2018 00:05:06 +0000 (+0000) Subject: fix some poop that snuck into the last commit. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4da7852e56da51c0cd6bb9560c16e8d2fc850914;p=openbsd fix some poop that snuck into the last commit. noticed by bijanebrahimi at riseup dot net and confirmed by anton@ --- diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c index 34fe7314d83..68f333aaf59 100644 --- a/sys/netmpls/mpls_input.c +++ b/sys/netmpls/mpls_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls_input.c,v 1.66 2018/01/09 06:24:15 dlg Exp $ */ +/* $OpenBSD: mpls_input.c,v 1.67 2018/01/10 00:05:06 dlg Exp $ */ /* * Copyright (c) 2008 Claudio Jeker @@ -76,13 +76,15 @@ mpls_input(struct ifnet *ifp, struct mbuf *m) } shim = mtod(m, struct shim_hdr *); - #ifdef MPLS_DEBUG printf("mpls_input: iface %s label=%d, ttl=%d BoS %d\n", - ifp->if_xname, MPLS_LABEL_GET(shim->shim_label), ttls, hasbos); + ifp->if_xname, MPLS_LABEL_GET(shim->shim_label), + MPLS_TTL_GET(shim->shim_label, + MPLS_BOS_ISSET(shim->shim_label)); #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);