From: Roy Marples Date: Sun, 14 Apr 2019 11:01:21 +0000 (+0300) Subject: sun: Update the interface index after plumbing X-Git-Tag: v7.2.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f91920d37f01b99f3207c40495582ae2dbf9adac;p=thirdparty%2Fdhcpcd.git sun: Update the interface index after plumbing Otherwise it's likely zero .... --- diff --git a/src/if-sun.c b/src/if-sun.c index d6534755..10816dd0 100644 --- a/src/if-sun.c +++ b/src/if-sun.c @@ -1489,6 +1489,9 @@ if_address(unsigned char cmd, const struct ipv4_addr *ia) return -1; } + /* We need to update the index now */ + ia->iface->index = if_nametoindex(ia->alias); + sin_addr = (struct sockaddr_in *)&ss_addr; sin_addr->sin_family = AF_INET; sin_addr->sin_addr = ia->addr;