diff options
author | Ronan Pigott <ronan@rjp.ie> | 2023-03-27 09:43:58 -0700 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-04-05 13:27:16 +0200 |
commit | cad0fc7a1363b3221566d37092b5cc7576e65d1f (patch) | |
tree | 7a0a1abf762c55ee08be8e222ad9e6e1c180ddaf /src/resolve/resolved-manager.c | |
parent | effd05626df09872e4474baa3c3c3952999e001c (diff) | |
download | systemd-cad0fc7a1363b3221566d37092b5cc7576e65d1f.tar.gz |
resolve: refuse mdns scope for ipv4 broadcast addresses
This query can never be answered, so let's no wait for it to timeout.
Diffstat (limited to 'src/resolve/resolved-manager.c')
-rw-r--r-- | src/resolve/resolved-manager.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index ec854774af..57e26f4975 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -106,7 +106,7 @@ fail: static int manager_process_address(sd_netlink *rtnl, sd_netlink_message *mm, void *userdata) { Manager *m = ASSERT_PTR(userdata); - union in_addr_union address; + union in_addr_union address, broadcast = {}; uint16_t type; int r, ifindex, family; LinkAddress *a; @@ -134,6 +134,7 @@ static int manager_process_address(sd_netlink *rtnl, sd_netlink_message *mm, voi switch (family) { case AF_INET: + sd_netlink_message_read_in_addr(mm, IFA_BROADCAST, &broadcast.in); r = sd_netlink_message_read_in_addr(mm, IFA_LOCAL, &address.in); if (r < 0) { r = sd_netlink_message_read_in_addr(mm, IFA_ADDRESS, &address.in); @@ -164,7 +165,7 @@ static int manager_process_address(sd_netlink *rtnl, sd_netlink_message *mm, voi case RTM_NEWADDR: if (!a) { - r = link_address_new(l, &a, family, &address); + r = link_address_new(l, &a, family, &address, &broadcast); if (r < 0) return r; } |