Conversation
fb8a7c5 to
1250c2e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This pull request introduces 1 alert when merging 9facc68 into 9d67fb0 - view on LGTM.com new alerts:
|
|
needs a rebase |
16285b8 to
c76525e
Compare
keszybz
left a comment
There was a problem hiding this comment.
Looks reasonable. I'm a bit surprised that we need to do dbus introspection to figure out the path. @poettering, opinions on that?
| typedef enum { | ||
| MM_BEARER_IP_FAMILY_NONE = 0, | ||
| MM_BEARER_IP_FAMILY_IPV4 = 1 << 0, | ||
| MM_BEARER_IP_FAMILY_IPV6 = 1 << 1, | ||
| MM_BEARER_IP_FAMILY_IPV4V6 = 1 << 2, | ||
| MM_BEARER_IP_FAMILY_ANY = 0xFFFFFFFF | ||
| } MMBearerIpFamily; |
There was a problem hiding this comment.
Wouldn't it be better to just reuse ADDRESS_FAMILY_* for this? The mapping seems to be 1:1 anyway.
There was a problem hiding this comment.
No, ADDRESS_FAMILY_YES is 3, not 4.
|
|
||
| if (b->connected && b->ip4_method == MM_BEARER_IP_METHOD_DHCP) { | ||
| if (!link_dhcp4_enabled(link)) | ||
| log_link_notice(link, "The WWAN connection requested DHCPv4 client, but it is disabled."); |
There was a problem hiding this comment.
Hmm, IIUC, we log notice but otherwise ignore our own config. I think this is not very useful: we should either let our config take priority here, and not call dhcp4_start(), or we should just ignore our own config. Ideally, we would default link->network->dhcp to ADDRESS_FAMILY_ANY if the support for ModemManager is configured. This would make things "just work", but still allow explicit configuration if wanted.
There was a problem hiding this comment.
dhcp4_start() does nothing and returns 0 when DHCP4 client is disabled. So, the current implementation is equivalent to the first suggestion.
| if (!link_ipv6_accept_ra_enabled(link) && !link_dhcp6_enabled(link)) | ||
| log_link_notice(link, | ||
| "The WWAN connection requested IPv6 dynamic address configuration," | ||
| "but both IPv6 Router Discovery and DHCPv6 client are disabled."); |
There was a problem hiding this comment.
Also here, ndisc_start() and dhcp6_start() do nothing if they are disabled.
Heavily based on systemd#22315 by Yu Watanabe. Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Upstream-Status: Inappropriate [Inappropriate]
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no ModemSimpleConnectProps=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 [DHCP] RouteMetric=200 [DHCPv4] UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectProperties=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Heavily based on systemd#22315 by Yu Watanabe. [Match] Name=wwan* [Network] LLDP=no LinkLocalAddressing=no IPv6AcceptRA=no [ModemManager] SimpleConnectPropertie]s=apn=internet ip-type=ipv4 allow-roaming=no pin=1111 operator-id=25503 RouteMetric=200 UseGateway=yes Co-authored-by: Yu Watanabe <[email protected]>
Closes #20370.