Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107169981
D42027.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
991 B
Referenced Files
None
Subscribers
None
D42027.diff
View Options
diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c
--- a/sys/netlink/route/iface.c
+++ b/sys/netlink/route/iface.c
@@ -292,6 +292,7 @@
dump_iface(struct nl_writer *nw, if_t ifp, const struct nlmsghdr *hdr,
int if_flags_mask)
{
+ struct epoch_tracker et;
struct ifinfomsg *ifinfo;
NL_LOG(LOG_DEBUG3, "dumping interface %s data", if_name(ifp));
@@ -321,11 +322,15 @@
nlattr_add_u8(nw, IFLA_PROTO_DOWN, val);
nlattr_add_u8(nw, IFLA_LINKMODE, val);
*/
- if (if_getaddrlen(ifp) != 0) {
- struct ifaddr *ifa = if_getifaddr(ifp);
+ if (if_getaddrlen(ifp) != 0) {
+ struct ifaddr *ifa;
- dump_sa(nw, IFLA_ADDRESS, ifa->ifa_addr);
- }
+ NET_EPOCH_ENTER(et);
+ ifa = CK_STAILQ_FIRST(&ifp->if_addrhead);
+ if (ifa != NULL)
+ dump_sa(nw, IFLA_ADDRESS, ifa->ifa_addr);
+ NET_EPOCH_EXIT(et);
+ }
if ((if_getbroadcastaddr(ifp) != NULL)) {
nlattr_add(nw, IFLA_BROADCAST, if_getaddrlen(ifp),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 4:50 AM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15761360
Default Alt Text
D42027.diff (991 B)
Attached To
Mode
D42027: netlink: fix accessing freed memory
Attached
Detach File
Event Timeline
Log In to Comment