]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
fix breakage
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 16 Nov 2009 18:50:49 +0000 (19:50 +0100)
committerJohannes Berg <johannes@sipsolutions.net>
Mon, 16 Nov 2009 18:50:49 +0000 (19:50 +0100)
The nl80211.h update broke iw. This is not supposed
to happen, but a commit went into the kernel that
made an API incompatible change.

mpath.c

diff --git a/mpath.c b/mpath.c
index dba8cd2a5f19f5914e8becafb9ff99a0a48709bc..b362d54746440baae800b6a0ef698946e624b938 100644 (file)
--- a/mpath.c
+++ b/mpath.c
@@ -38,7 +38,7 @@ static int print_mpath_handler(struct nl_msg *msg, void *arg)
        char dst[20], next_hop[20], dev[20];
        static struct nla_policy mpath_policy[NL80211_MPATH_INFO_MAX + 1] = {
                [NL80211_MPATH_INFO_FRAME_QLEN] = { .type = NLA_U32 },
-               [NL80211_MPATH_INFO_DSN] = { .type = NLA_U32 },
+               [NL80211_MPATH_INFO_SN] = { .type = NLA_U32 },
                [NL80211_MPATH_INFO_METRIC] = { .type = NLA_U32 },
                [NL80211_MPATH_INFO_EXPTIME] = { .type = NLA_U32 },
                [NL80211_MPATH_INFO_DISCOVERY_TIMEOUT] = { .type = NLA_U32 },
@@ -70,9 +70,9 @@ static int print_mpath_handler(struct nl_msg *msg, void *arg)
        mac_addr_n2a(next_hop, nla_data(tb[NL80211_ATTR_MPATH_NEXT_HOP]));
        if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), dev);
        printf("%s %s %s", dst, next_hop, dev);
-       if (pinfo[NL80211_MPATH_INFO_DSN])
+       if (pinfo[NL80211_MPATH_INFO_SN])
                printf("\t%u",
-                       nla_get_u32(pinfo[NL80211_MPATH_INFO_DSN]));
+                       nla_get_u32(pinfo[NL80211_MPATH_INFO_SN]));
        if (pinfo[NL80211_MPATH_INFO_METRIC])
                printf("\t%u",
                        nla_get_u32(pinfo[NL80211_MPATH_INFO_METRIC]));