diff options
| author | Michael Biebl <biebl@debian.org> | 2019-11-25 18:53:53 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-11-25 18:53:53 +0100 |
| commit | e22609983008e1a669196ad64ba3a59ae8c76e0d (patch) | |
| tree | c5b97693244d5004cbe735d507a25159512a753d /src/ndisc | |
| parent | 9c642eac191ef0dce49855d8da0a9e9af18d5113 (diff) | |
New upstream version 1.20.8 upstream/1.20.8
Diffstat (limited to 'src/ndisc')
| -rw-r--r-- | src/ndisc/nm-lndp-ndisc.c | 13 | ||||
| -rw-r--r-- | src/ndisc/nm-ndisc.c | 8 | ||||
| -rw-r--r-- | src/ndisc/nm-ndisc.h | 4 |
3 files changed, 25 insertions, 0 deletions
diff --git a/src/ndisc/nm-lndp-ndisc.c b/src/ndisc/nm-lndp-ndisc.c index 5643c192..9352a753 100644 --- a/src/ndisc/nm-lndp-ndisc.c +++ b/src/ndisc/nm-lndp-ndisc.c @@ -116,6 +116,7 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) gint32 now = nm_utils_get_monotonic_timestamp_s (); int offset; int hop_limit; + guint32 val; /* Router discovery is subject to the following RFC documents: * @@ -294,6 +295,18 @@ receive_ra (struct ndp *ndp, struct ndp_msg *msg, gpointer user_data) changed |= NM_NDISC_CONFIG_HOP_LIMIT; } + val = ndp_msgra_reachable_time (msgra); + if (val && rdata->public.reachable_time_ms != val) { + rdata->public.reachable_time_ms = val; + changed |= NM_NDISC_CONFIG_REACHABLE_TIME; + } + + val = ndp_msgra_retransmit_time (msgra); + if (val && rdata->public.retrans_timer_ms != val) { + rdata->public.retrans_timer_ms = val; + changed |= NM_NDISC_CONFIG_RETRANS_TIMER; + } + /* MTU */ ndp_msg_opt_for_each_offset(offset, msg, NDP_MSG_OPT_MTU) { guint32 mtu = ndp_msg_opt_mtu(msg, offset); diff --git a/src/ndisc/nm-ndisc.c b/src/ndisc/nm-ndisc.c index 1acf5ba9..a8fabb56 100644 --- a/src/ndisc/nm-ndisc.c +++ b/src/ndisc/nm-ndisc.c @@ -1039,6 +1039,14 @@ _config_changed_log (NMNDisc *ndisc, NMNDiscConfigMap changed) config_map_to_string (changed, changedstr); _LOGD ("neighbor discovery configuration changed [%s]:", changedstr); _LOGD (" dhcp-level %s", dhcp_level_to_string (priv->rdata.public.dhcp_level)); + + if (rdata->public.hop_limit) + _LOGD (" hop limit : %d", rdata->public.hop_limit); + if (rdata->public.reachable_time_ms) + _LOGD (" reachable time : %u", (guint) rdata->public.reachable_time_ms); + if (rdata->public.retrans_timer_ms) + _LOGD (" retrans timer : %u", (guint) rdata->public.retrans_timer_ms); + for (i = 0; i < rdata->gateways->len; i++) { NMNDiscGateway *gateway = &g_array_index (rdata->gateways, NMNDiscGateway, i); diff --git a/src/ndisc/nm-ndisc.h b/src/ndisc/nm-ndisc.h index 766d4ab9..8e07ca41 100644 --- a/src/ndisc/nm-ndisc.h +++ b/src/ndisc/nm-ndisc.h @@ -112,6 +112,8 @@ typedef enum { NM_NDISC_CONFIG_DNS_DOMAINS = 1 << 5, NM_NDISC_CONFIG_HOP_LIMIT = 1 << 6, NM_NDISC_CONFIG_MTU = 1 << 7, + NM_NDISC_CONFIG_REACHABLE_TIME = 1 << 8, + NM_NDISC_CONFIG_RETRANS_TIMER = 1 << 9, } NMNDiscConfigMap; typedef enum { @@ -137,6 +139,8 @@ typedef struct { NMNDiscDHCPLevel dhcp_level; guint32 mtu; int hop_limit; + guint32 reachable_time_ms; + guint32 retrans_timer_ms; guint gateways_n; guint addresses_n; |