Fix possible IPv6 spoofing
This commit is contained in:
parent
500bd3b1ae
commit
4ac1a26396
1 changed files with 1 additions and 1 deletions
2
ppp.c
2
ppp.c
|
|
@ -2244,7 +2244,7 @@ void processipv6in(sessionidt s, tunnelidt t, uint8_t *p, uint16_t l)
|
|||
return;
|
||||
|
||||
// no spoof
|
||||
if (ipv4 != session[s].ip && memcmp(&config->ipv6_prefix, &ip, 8) && sessionbyipv6(ip) != s)
|
||||
if ((ipv4 != session[s].ip || memcmp(&config->ipv6_prefix, &ip, 8)) && sessionbyipv6(ip) != s)
|
||||
{
|
||||
char str[INET6_ADDRSTRLEN];
|
||||
LOG(5, s, t, "Dropping packet with spoofed IP %s\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue