L2 advertisement: always match if the allInterfaces flag is set
If the flag is set, we don't need to iterate over the interfaces to find
a match because it will always be the case.
@@ -43,6 +43,9 @@ func (i1 *IPAdvertisement) Equal(i2 *IPAdvertisement) bool {
}
func (i *IPAdvertisement) MatchInterfaces(intfs ...string) bool {
+ if i.allInterfaces {
+ return true
+ }
for _, intf := range intfs {
if i.matchInterface(intf) {
return true
