aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2006-01-13 17:29:07 -0500
committerDavid S. Miller <davem@davemloft.net>2006-01-13 17:29:07 -0500
commit46b86a2da0fd14bd49765330df63a62279833acb (patch)
tree069b4741a970db9b03772a870b4d63398b1f56e0 /security
parent23b0ca5bf52cef0ab0f0fe247cb91cbef836e7eb (diff)
[NET]: Use NIP6_FMT in kernel.h
There are errors and inconsistency in the display of NIP6 strings. ie: net/ipv6/ip6_flowlabel.c There are errors and inconsistency in the display of NIPQUAD strings too. ie: net/netfilter/nf_conntrack_ftp.c This patch: adds NIP6_FMT to kernel.h changes all code to use NIP6_FMT fixes net/ipv6/ip6_flowlabel.c adds NIPQUAD_FMT to kernel.h fixes net/netfilter/nf_conntrack_ftp.c changes a few uses of "%u.%u.%u.%u" to NIPQUAD_FMT for symmetry to NIP6_FMT Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/avc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index 12e4fb72bf0f..53d6c7bbf564 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -494,8 +494,7 @@ static inline void avc_print_ipv6_addr(struct audit_buffer *ab,
494 char *name1, char *name2) 494 char *name1, char *name2)
495{ 495{
496 if (!ipv6_addr_any(addr)) 496 if (!ipv6_addr_any(addr))
497 audit_log_format(ab, " %s=%04x:%04x:%04x:%04x:%04x:" 497 audit_log_format(ab, " %s=" NIP6_FMT, name1, NIP6(*addr));
498 "%04x:%04x:%04x", name1, NIP6(*addr));
499 if (port) 498 if (port)
500 audit_log_format(ab, " %s=%d", name2, ntohs(port)); 499 audit_log_format(ab, " %s=%d", name2, ntohs(port));
501} 500}
@@ -504,7 +503,7 @@ static inline void avc_print_ipv4_addr(struct audit_buffer *ab, u32 addr,
504 __be16 port, char *name1, char *name2) 503 __be16 port, char *name1, char *name2)
505{ 504{
506 if (addr) 505 if (addr)
507 audit_log_format(ab, " %s=%d.%d.%d.%d", name1, NIPQUAD(addr)); 506 audit_log_format(ab, " %s=" NIPQUAD_FMT, name1, NIPQUAD(addr));
508 if (port) 507 if (port)
509 audit_log_format(ab, " %s=%d", name2, ntohs(port)); 508 audit_log_format(ab, " %s=%d", name2, ntohs(port));
510} 509}