The TTL check must be done after instance ID dispatch to avoid warnings
when a physical iface is shared by multiple instances and some use TTL
security and some not.
if (pkt == NULL)
DROP("bad IP header", len);
- if (ifa->check_ttl && (sk->rcv_ttl < 255))
- DROP("wrong TTL", sk->rcv_ttl);
-
if (len < sizeof(struct ospf_packet))
DROP("too short", len);
if (ipa_equal(sk->laddr, ifa->des_routers) && (ifa->sk_dr == 0))
return 1;
+ /* TTL check must be done after instance dispatch */
+ if (ifa->check_ttl && (sk->rcv_ttl < 255))
+ DROP("wrong TTL", sk->rcv_ttl);
+
if (rid == p->router_id)
DROP1("my own router ID");