summaryrefslogtreecommitdiff
path: root/sys/netmpls
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-09-03 10:39:09 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-09-03 10:39:09 +0000
commit57abe288969510702f216bf08cd205070a8ba17f (patch)
tree66d7cc03268a2c42ee1f3908948cc0176e10a9ac /sys/netmpls
parent0d21bf48fc33deab4f3a1aa0968fc5fd64518492 (diff)
correct INET6 path in mpls_getttl() and avoid uninitialised variable
ok dlg@
Diffstat (limited to 'sys/netmpls')
-rw-r--r--sys/netmpls/mpls_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netmpls/mpls_output.c b/sys/netmpls/mpls_output.c
index 62f05b96ad8..44c48eaefaa 100644
--- a/sys/netmpls/mpls_output.c
+++ b/sys/netmpls/mpls_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpls_output.c,v 1.27 2019/08/27 00:49:48 dlg Exp $ */
+/* $OpenBSD: mpls_output.c,v 1.28 2019/09/03 10:39:08 jsg Exp $ */
/*
* Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org>
@@ -180,7 +180,7 @@ mpls_getttl(struct mbuf *m, sa_family_t af)
#ifdef INET6
case 6:
if (!mpls_mapttl_ip6)
- break;
+ return (ttl);
loc = offsetof(struct ip6_hdr, ip6_hlim);
break;