mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-01 09:08:05 +02:00
ndisc/trivial: stype fixes in receive_ra()
This commit is contained in:
parent
a5290915d5
commit
0cbd9193cd
1 changed files with 6 additions and 2 deletions
|
|
@ -100,7 +100,9 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
|||
gint32 now = nm_utils_get_monotonic_timestamp_sec ();
|
||||
int offset;
|
||||
int hop_limit;
|
||||
guint32 val, clamp_pltime, clamp_vltime;
|
||||
guint32 val;
|
||||
guint32 clamp_pltime;
|
||||
guint32 clamp_vltime;
|
||||
|
||||
/* Router discovery is subject to the following RFC documents:
|
||||
*
|
||||
|
|
@ -177,7 +179,9 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
|||
*/
|
||||
#define NM_NDISC_VLTIME_MULT ((guint32) 48)
|
||||
clamp_pltime = ndp_msgra_router_lifetime (msgra);
|
||||
clamp_vltime = (clamp_pltime < G_MAXUINT32 / NM_NDISC_VLTIME_MULT)? clamp_pltime * NM_NDISC_VLTIME_MULT : G_MAXUINT32;
|
||||
clamp_vltime = (clamp_pltime < G_MAXUINT32 / NM_NDISC_VLTIME_MULT)
|
||||
? clamp_pltime * NM_NDISC_VLTIME_MULT
|
||||
: G_MAXUINT32;
|
||||
|
||||
ndp_msg_opt_for_each_offset (offset, msg, NDP_MSG_OPT_PREFIX) {
|
||||
guint8 r_plen;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue