Explicitly ignore the Hop Count and Path Vector TLVs.
authorrenato <renato@openbsd.org>
Fri, 15 Jul 2016 17:05:50 +0000 (17:05 +0000)
committerrenato <renato@openbsd.org>
Fri, 15 Jul 2016 17:05:50 +0000 (17:05 +0000)
Since these are "well known" TLVs, we have to explicitly ignore them
otherwise ldpd would send "Unknown TLV" Notification messages when it
shouldn't.

Fixes regression caused by rev1.51.

usr.sbin/ldpd/labelmapping.c

index 6b592f0..b6a736a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: labelmapping.c,v 1.55 2016/07/01 23:36:38 renato Exp $ */
+/*     $OpenBSD: labelmapping.c,v 1.56 2016/07/15 17:05:50 renato Exp $ */
 
 /*
  * Copyright (c) 2014, 2015 Renato Westphal <renato@openbsd.org>
@@ -270,6 +270,10 @@ recv_labelmessage(struct nbr *nbr, char *buf, uint16_t len, uint16_t type)
                                break;
                        }
                        break;
+               case TLV_TYPE_HOPCOUNT:
+               case TLV_TYPE_PATHVECTOR:
+                       /* ignore */
+                       break;
                case TLV_TYPE_GENERICLABEL:
                        switch (type) {
                        case MSG_TYPE_LABELWITHDRAW: