x25: bit and/or confusion in x25_ioctl()?
authorroel kluin <roel.kluin@gmail.com>
Wed, 7 Oct 2009 00:59:42 +0000 (00:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2009 10:44:07 +0000 (03:44 -0700)
Looking at commit ebc3f64b864f it appears that this was intended
and not the original, equivalent to `if (facilities.reverse & ~0x81)'.

In x25_parse_facilities() that patch changed how facilities->reverse
was set. No other bits were set than 0x80 and/or 0x01.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/x25/af_x25.c

index ebbfe6bbbff98ddde3f7c4fbb44babb5fd38b11c..e19d811788a548c73e137f600ed2f7c6c258a959 100644 (file)
@@ -1363,7 +1363,7 @@ static int x25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
                            facilities.throughput > 0xDD)
                                break;
                        if (facilities.reverse &&
-                               (facilities.reverse | 0x81)!= 0x81)
+                               (facilities.reverse & 0x81) != 0x81)
                                break;
                        x25->facilities = facilities;
                        rc = 0;