mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 05:00:36 +01:00
core: only set IPv6 hop_limit for values greater than zero
A "Cur Hop Limit" field value of 0 in a router advertisement means "unspecified by this router" and should not be set in the kernel.
This commit is contained in:
parent
c0ecd2f628
commit
c668297257
1 changed files with 3 additions and 1 deletions
|
|
@ -3649,7 +3649,9 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *self)
|
|||
}
|
||||
}
|
||||
|
||||
if (changed & NM_RDISC_CONFIG_HOP_LIMIT) {
|
||||
/* hop_limit == 0 is a special value "unspecified", so do not touch
|
||||
* in this case */
|
||||
if (changed & NM_RDISC_CONFIG_HOP_LIMIT && rdisc->hop_limit > 0) {
|
||||
char val[16];
|
||||
|
||||
g_snprintf (val, sizeof (val), "%d", rdisc->hop_limit);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue