Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149199849
D6979.1789658776.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6979.1789658776.diff
View Options
Index: head/usr.sbin/rtadvd/if.c
===================================================================
--- head/usr.sbin/rtadvd/if.c
+++ head/usr.sbin/rtadvd/if.c
@@ -470,11 +470,18 @@
ifindex != ifm->ifm_index)
continue;
+ /* ifname */
+ if (if_indextoname(ifm->ifm_index, ifname) == NULL) {
+ syslog(LOG_WARNING,
+ "<%s> ifname not found (idx=%d)",
+ __func__, ifm->ifm_index);
+ continue;
+ }
+
/* lookup an entry with the same ifindex */
TAILQ_FOREACH(ifi, ifi_head, ifi_next) {
if (ifm->ifm_index == ifi->ifi_ifindex)
break;
- if_indextoname(ifm->ifm_index, ifname);
if (strncmp(ifname, ifi->ifi_ifname,
sizeof(ifname)) == 0)
break;
@@ -493,15 +500,7 @@
ifi->ifi_ifindex = ifm->ifm_index;
/* ifname */
- if_indextoname(ifm->ifm_index, ifi->ifi_ifname);
- if (ifi->ifi_ifname == NULL) {
- syslog(LOG_WARNING,
- "<%s> ifname not found (idx=%d)",
- __func__, ifm->ifm_index);
- if (ifi_new)
- free(ifi);
- continue;
- }
+ strlcpy(ifi->ifi_ifname, ifname, IFNAMSIZ);
if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) {
syslog(LOG_ERR,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Sep 17, 3:26 PM (8 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29735278
Default Alt Text
D6979.1789658776.diff (1 KB)
Attached To
Mode
D6979: [usr.sbin/rtadvd] optimize and secure interface lookup
Attached
Detach File
Event Timeline
Log In to Comment