mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 01:31:55 +00:00
Fixes LLS compatibility.
This commit is contained in:
parent
5d53b80770
commit
885b3d6127
@ -140,13 +140,6 @@ ospf_pkt_checkauth(struct ospf_neighbor *n, struct ospf_iface *ifa, struct ospf_
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n && (ifa != n->ifa))
|
|
||||||
{
|
|
||||||
OSPF_TRACE(D_PACKETS, "OSPF_auth: received packet from strange interface (%s/%s)",
|
|
||||||
ifa->iface->name, n->ifa->iface->name);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(ifa->autype)
|
switch(ifa->autype)
|
||||||
{
|
{
|
||||||
case OSPF_AUTH_NONE:
|
case OSPF_AUTH_NONE:
|
||||||
@ -178,19 +171,13 @@ ospf_pkt_checkauth(struct ospf_neighbor *n, struct ospf_iface *ifa, struct ospf_
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ntohs(pkt->length) + OSPF_AUTH_CRYPT_SIZE != size)
|
if (ntohs(pkt->length) + OSPF_AUTH_CRYPT_SIZE > size)
|
||||||
{
|
{
|
||||||
OSPF_TRACE(D_PACKETS, "OSPF_auth: size mismatch (%d vs %d)",
|
OSPF_TRACE(D_PACKETS, "OSPF_auth: size mismatch (%d vs %d)",
|
||||||
ntohs(pkt->length) + OSPF_AUTH_CRYPT_SIZE, size);
|
ntohs(pkt->length) + OSPF_AUTH_CRYPT_SIZE, size);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pkt->u.md5.zero)
|
|
||||||
{
|
|
||||||
OSPF_TRACE(D_PACKETS, "OSPF_auth: \"zero\" area is non-zero");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
tail = ((void *)pkt) + ntohs(pkt->length);
|
tail = ((void *)pkt) + ntohs(pkt->length);
|
||||||
|
|
||||||
if (ifa->passwords)
|
if (ifa->passwords)
|
||||||
|
Loading…
Reference in New Issue
Block a user