diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2015-11-19 01:45:19 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2015-11-19 01:45:19 +0100 |
commit | 25422154e8ebda7a9bfd52d7e0cbd7254fed39b3 (patch) | |
tree | 6606857c45f3f62e313476a04c8103dcef0e7759 /src/libsystemd-network | |
parent | 81ec9ce4a71e44c29231d813b8847ebafc11b36e (diff) | |
parent | fe30727643a7c53faa29f1caa8dcabcb2b6f6fcb (diff) |
Merge pull request #1948 from teg/networkd-fixes
sd-ndisc: drop packets from invalid source addresses
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r-- | src/libsystemd-network/sd-ndisc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c index 6703d87bc4..3bb06f6892 100644 --- a/src/libsystemd-network/sd-ndisc.c +++ b/src/libsystemd-network/sd-ndisc.c @@ -508,6 +508,9 @@ static int ndisc_router_advertisment_recv(sd_event_source *s, int fd, uint32_t r return 0; } + if (!in_addr_is_link_local(AF_INET6, (const union in_addr_union*) &router.in6.sin6_addr)) + return 0; + if (ra->nd_ra_type != ND_ROUTER_ADVERT) return 0; |