diff options
Diffstat (limited to 'src/devices')
| -rw-r--r-- | src/devices/nm-device.c | 1 | ||||
| -rw-r--r-- | src/devices/tests/test-arping.c | 6 | ||||
| -rw-r--r-- | src/devices/tests/test-lldp.c | 4 | ||||
| -rw-r--r-- | src/devices/wwan/nm-modem-broadband.c | 6 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index dde9af94..3d949ec2 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5725,6 +5725,7 @@ rdisc_config_changed (NMRDisc *rdisc, NMRDiscConfigMap changed, NMDevice *self) if (discovered_route->plen > 0) { memset (&route, 0, sizeof (route)); route.network = discovered_route->network; + nm_assert (discovered_route->plen <= 128); route.plen = discovered_route->plen; route.gateway = discovered_route->gateway; route.source = NM_IP_CONFIG_SOURCE_RDISC; diff --git a/src/devices/tests/test-arping.c b/src/devices/tests/test-arping.c index 72d28a7a..244d0715 100644 --- a/src/devices/tests/test-arping.c +++ b/src/devices/tests/test-arping.c @@ -79,7 +79,7 @@ test_arping_common (test_fixture *fixture, TestInfo *info) g_assert (nm_arping_manager_add_address (manager, info->addresses[i])); for (i = 0; info->peer_addresses[i]; i++) { - nmtstp_ip4_address_add (FALSE, fixture->ifindex1, info->peer_addresses[i], + nmtstp_ip4_address_add (NULL, FALSE, fixture->ifindex1, info->peer_addresses[i], 24, 0, 3600, 1800, 0, NULL); } @@ -126,13 +126,13 @@ fixture_teardown (test_fixture *fixture, gconstpointer user_data) } void -init_tests (int *argc, char ***argv) +_nmtstp_init_tests (int *argc, char ***argv) { nmtst_init_with_logging (argc, argv, NULL, "ALL"); } void -setup_tests (void) +_nmtstp_setup_tests (void) { g_test_add ("/arping/1", test_fixture, NULL, fixture_setup, test_arping_1, fixture_teardown); g_test_add ("/arping/2", test_fixture, NULL, fixture_setup, test_arping_2, fixture_teardown); diff --git a/src/devices/tests/test-lldp.c b/src/devices/tests/test-lldp.c index 1b7f536d..bff85e6c 100644 --- a/src/devices/tests/test-lldp.c +++ b/src/devices/tests/test-lldp.c @@ -435,13 +435,13 @@ _test_recv_fixture_teardown (TestRecvFixture *fixture, gconstpointer user_data) /*****************************************************************************/ void -init_tests (int *argc, char ***argv) +_nmtstp_init_tests (int *argc, char ***argv) { nmtst_init_assert_logging (argc, argv, "WARN", "ALL"); } void -setup_tests (void) +_nmtstp_setup_tests (void) { #define _TEST_ADD_RECV(testpath, testdata) \ g_test_add (testpath, TestRecvFixture, testdata, _test_recv_fixture_setup, test_recv, _test_recv_fixture_teardown) diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c index 769e6a27..9539fefd 100644 --- a/src/devices/wwan/nm-modem-broadband.c +++ b/src/devices/wwan/nm-modem-broadband.c @@ -870,7 +870,8 @@ static_stage3_ip4_done (NMModemBroadband *self) address.peer_address = address_network; address.plen = mm_bearer_ip_config_get_prefix (self->priv->ipv4_config); address.source = NM_IP_CONFIG_SOURCE_WWAN; - nm_ip4_config_add_address (config, &address); + if (address.plen <= 32) + nm_ip4_config_add_address (config, &address); nm_log_info (LOGD_MB, " address %s/%d", address_string, address.plen); @@ -960,7 +961,8 @@ stage3_ip6_done (NMModemBroadband *self) config = nm_ip6_config_new (nm_platform_link_get_ifindex (NM_PLATFORM_GET, data_port)); address.plen = mm_bearer_ip_config_get_prefix (self->priv->ipv6_config); - nm_ip6_config_add_address (config, &address); + if (address.plen <= 128) + nm_ip6_config_add_address (config, &address); nm_log_info (LOGD_MB, " address %s/%d", address_string, address.plen); |