]> The Tcpdump Group git mirrors - tcpdump/commitdiff
RADIUS: Filter out non-printable characters
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 9 Nov 2015 18:53:38 +0000 (19:53 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 9 Nov 2015 19:09:04 +0000 (20:09 +0100)
Update a test according to this change.

print-radius.c
tests/radius-rfc4675-v.out

index c30e24cbe7c3a0169dc3b041bcd93314abb65966..d89e3b84b98346aabed523e1e37e3d3b92bf3753 100644 (file)
@@ -537,7 +537,7 @@ print_attr_string(netdissect_options *ndo,
    }
 
    for (i=0; *data && i < length ; i++, data++)
-       ND_PRINT((ndo, "%c", (*data < 32 || *data > 128) ? '.' : *data));
+       ND_PRINT((ndo, "%c", (*data < 32 || *data > 126) ? '.' : *data));
 
    return;
 
@@ -597,7 +597,7 @@ print_vendor_attr(netdissect_options *ndo,
                vendor_type,
                vendor_length));
         for (idx = 0; idx < vendor_length ; idx++, data++)
-            ND_PRINT((ndo, "%c", (*data < 32 || *data > 128) ? '.' : *data));
+            ND_PRINT((ndo, "%c", (*data < 32 || *data > 126) ? '.' : *data));
         length-=vendor_length;
     }
     return;
index ff0e96f72e14fad52e47843403a7f3284cb18d14..c1cea563eb360ab04b56fdeaff7d0673c91ff7e8 100644 (file)
@@ -5,7 +5,7 @@ IP (tos 0x0, ttl 64, id 20820, offset 0, flags [none], proto UDP (17), length 10
          User-Password Attribute (2), length: 18, Value: 
          NAS-IP-Address Attribute (4), length: 6, Value: 127.0.0.1
          NAS-Port Attribute (5), length: 6, Value: 1
-         Message-Authenticator Attribute (80), length: 18, Value: .....b..7-\7f...b.
+         Message-Authenticator Attribute (80), length: 18, Value: .....b..7-....b.
 IP (tos 0x0, ttl 64, id 20821, offset 0, flags [none], proto UDP (17), length 81)
     127.0.0.1.1812 > 127.0.0.1.53334: RADIUS, length: 53
        Access-Accept (2), id: 0x46, Authenticator: 766a0314eaf4b95f1ec271ae19cb3bdc