mirror of
https://github.com/samba-team/samba.git
synced 2025-10-24 15:33:20 +03:00
s3:lib/addrchange: look at the correct nl_pid in addrchange_done()
state->fromaddr is the address we got from recvfrom_send/recv. state->addr is completely untouched after tevent_req_create(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
@@ -126,7 +126,7 @@ static void addrchange_done(struct tevent_req *subreq)
|
||||
subreq, struct tevent_req);
|
||||
struct addrchange_state *state = tevent_req_data(
|
||||
req, struct addrchange_state);
|
||||
struct sockaddr_nl *addr;
|
||||
struct sockaddr_nl *fromaddr;
|
||||
struct nlmsghdr *h;
|
||||
struct ifaddrmsg *ifa;
|
||||
struct rtattr *rta;
|
||||
@@ -148,10 +148,10 @@ static void addrchange_done(struct tevent_req *subreq)
|
||||
goto retry;
|
||||
}
|
||||
|
||||
addr = (struct sockaddr_nl *)(void *)&state->addr;
|
||||
if (addr->nl_pid != 0) {
|
||||
fromaddr = (struct sockaddr_nl *)(void *)&state->fromaddr;
|
||||
if (fromaddr->nl_pid != 0) {
|
||||
DEBUG(10, ("Got msg from pid %d, not from the kernel\n",
|
||||
(int)addr->nl_pid));
|
||||
(int)fromaddr->nl_pid));
|
||||
goto retry;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user