diff options
author | John Dykstra <john.dykstra1@gmail.com> | 2009-06-12 05:57:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-12 05:57:21 +0200 |
commit | 746e6ad23cd6fec2edce056e014a0eabeffa838c (patch) | |
tree | f44de53e3fca1db32fee3c81ac87229c1f895cb3 /net/core/dev.c | |
parent | virtio_net: Fix IP alignment on non-mergeable RX path (diff) | |
download | linux-746e6ad23cd6fec2edce056e014a0eabeffa838c.tar.xz linux-746e6ad23cd6fec2edce056e014a0eabeffa838c.zip |
[PATCH] net core: Some interface flags not returned by SIOCGIFFLAGS
Commit b00055aacdb172c05067612278ba27265fcd05ce " [NET] core: add
RFC2863 operstate" defined new interface flag values. Its
documentation specified that these flags could be accessed from user
space via SIOCGIFFLAGS. However, this does not work because the new
flags do not fit in that ioctl's argument width.
Change the documentation to match the code's behavior. Also change
the source to explicitly show the truncation. This _should_ have no
effect on executable code, and did not with gcc 4.2.4 generating x86
code.
A new ioctl could be defined to return all interface flags to user
space. However, since this has been broken for three years with no
one complaining, there doesn't seem much need. They are still
accessible via netlink.
Reported-by: "Fredrik Arnerup" <fredrik.arnerup@edgeware.tv>
Signed-off-by: John Dykstra <john.dykstra1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 11560e3258b5..a09bf658970f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4209,7 +4209,7 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm switch (cmd) { case SIOCGIFFLAGS: /* Get interface flags */ - ifr->ifr_flags = dev_get_flags(dev); + ifr->ifr_flags = (short) dev_get_flags(dev); return 0; case SIOCGIFMETRIC: /* Get the metric on the interface |