Subject: [mpls] AddressList TLV in MAC Address Withdraw message

From: Egor Zimin <[email-masked]>
Date: Sun, 27 Feb 2011 12:23:15 +0300

Hi Ina,

Few days ago we had a deal with an interesting case of LDP 
interoperability. The root cause of our problem was the presence of 
empty "AddressList" TLV in LDP MacWithdraw message.
Vendor "C" inserts this TLV in every MAC Withdraw message even if there 
are no addresses to withdraw.
Their explanation:
---
"RFC 4762 introduces the MAC List TLV as an optional TLV to the Address 
Withdraw message, used to withdraw MAC addresses.  The addition of this 
optional TLV to the Address Withdraw message does not replace the 
Address List TLV.  While it would be perfectly acceptable to withdraw 
both IPV4 addresses as well as MAC addresses in the same Address 
Withdraw message, it's not always the case that there is a need to 
withdraw IPV4 addresses at the same time that there is a need to 
withdraw MAC addresses.  Also, given that the Address List TLV can not 
be omitted when sending an Address Message that withdraws MAC Addresses, 
the logical conclusion is to send an empty Address List TLV in the 
Address Withdraw message, along with the MAC List TLV. The empty address 
list TLV, while not explicitly specified, is not explicitly prohibited 
either. It would have been better had the RFCs been explicit on this 
subject, but the above logic is the best solution given the way that the 
RFCs are written."
---

Vendor "J" implies, that "AddressList" TLV is not mandatory in 
MACWithdraw message. They omit this TLV in their messages. However, in 
addition, they perform a strange check for minimal TLV length in all 
incoming messages. Because of this check empty AddressList TLV  (with 
length=2) considered as "Malformed TLV" and the session goes down.

I haven't found any mention about checking for "too short TLV" in RFC 
5036. However, point #11 in chapter "7. Changes from RFC 3036" states:
---
       11. Added case for TLV length too short in the specification for 
handling malformed TLVs.
---
It would be great to know your opinion about these questions:
1. The presence of empty AddressList TLV in MACWithdraw message. Is it 
mandatory or optional?
2. Checking incoming TLVs for minimal length. Is it correct behavior ?  
IMHO, it should be remembered about Jon Postel's law: "Be liberal in 
what you accept, and conservative in what you send"

-- 
Best regards,
  Egor Zimin