summaryrefslogtreecommitdiff
path: root/ripngd/ripngd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd/ripngd.c')
-rw-r--r--ripngd/ripngd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 9deac032..6e32d83c 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -272,7 +272,10 @@ ripng_recv_packet (int sock, u_char *buf, int bufsize,
/* Incoming packet's multicast hop limit. */
if (cmsgptr->cmsg_level == IPPROTO_IPV6 &&
cmsgptr->cmsg_type == IPV6_HOPLIMIT)
- *hoplimit = *((int *) CMSG_DATA (cmsgptr));
+ {
+ int *phoplimit = (int *) CMSG_DATA (cmsgptr);
+ *hoplimit = *phoplimit;
+ }
}
/* Hoplimit check shold be done when destination address is