summaryrefslogtreecommitdiff
path: root/accel-pppd/radius/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/radius/packet.c')
-rw-r--r--accel-pppd/radius/packet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/radius/packet.c b/accel-pppd/radius/packet.c
index ace9f6e2..5bff60af 100644
--- a/accel-pppd/radius/packet.c
+++ b/accel-pppd/radius/packet.c
@@ -284,6 +284,7 @@ void rad_packet_print(struct rad_packet_t *pack, struct rad_server_t *s, void (*
uint64_t ifid;
uint16_t u16[4];
} ifid_u;
+ in_addr_t addr;
if (s)
print("[RADIUS(%i) ", s->id);
@@ -348,7 +349,8 @@ void rad_packet_print(struct rad_packet_t *pack, struct rad_server_t *s, void (*
print("\"%s\"", attr->val.string);
break;
case ATTR_TYPE_IPADDR:
- print("%i.%i.%i.%i", attr->val.ipaddr & 0xff, (attr->val.ipaddr >> 8) & 0xff, (attr->val.ipaddr >> 16) & 0xff, (attr->val.ipaddr >> 24) & 0xff);
+ addr = ntohl(attr->val.ipaddr);
+ print("%i.%i.%i.%i", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
break;
case ATTR_TYPE_IFID:
ifid_u.ifid = attr->val.ifid;