InfrastructureServices / dnsconfd

Local DNS caching services configuration daemon.
Other
7 stars 2 forks source link

Routing configuration does not handle correctly address families #57

Closed pemensik closed 1 week ago

pemensik commented 2 months ago

I have tried enabling dnsconfd at home, where I have also IPv6 networks. But it has failed to start.

srp 30 13:12:25 pemensik-t460 dnsconfd[5530]: ERROR:DnsconfdContext:Failed to reapply connection to wlp4s0, org.freedesktop.NetworkManager.Settings.Connection.InvalidProperty: The settings specified are invalid: ipv4.route-data: failed to set property: Invalid IPv4 address 'fdc1:f7ea:bf32::2' (idx=0)

It is obvious IPv6 address route should not be used in ipv4.route-data and NM correctly refused that. I am not sure if this kind of error should be fatal error. It has left my machine without working resolution and I had to fix it by hand.

handle_routing: no put into dnsconfd.conf helped.

pemensik commented 2 months ago

version used dnsconfd-1.2.0-1.fc40.noarch.

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 50:7b:9d:e5:62:b8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.88.223/24 brd 192.168.88.255 scope global dynamic noprefixroute enp0s31f6
       valid_lft 38824sec preferred_lft 38824sec
    inet6 2a03:3b40:296:0:aaeb:8f83:cb61:f1a6/64 scope global temporary dynamic 
       valid_lft 600426sec preferred_lft 82012sec
    inet6 2a03:3b40:296:0:527b:9dff:fee5:62b8/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fdc1:f7ea:bf32:0:9305:f2b5:7cf7:5593/64 scope global temporary dynamic 
       valid_lft 600426sec preferred_lft 82012sec
    inet6 fdc1:f7ea:bf32:0:527b:9dff:fee5:62b8/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::527b:9dff:fee5:62b8/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 1e:0d:e2:48:0a:bc brd ff:ff:ff:ff:ff:ff permaddr 44:85:00:f3:49:04
    inet 192.168.88.137/24 brd 192.168.88.255 scope global dynamic noprefixroute wlp4s0
       valid_lft 38819sec preferred_lft 38819sec
    inet6 2a03:3b40:296:0:fad2:c587:8ae0:7e58/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fdc1:f7ea:bf32:0:a93f:fc78:377f:40ad/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::7e51:2048:8c37:9b15/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1360 qdisc fq_codel state UNKNOWN group default qlen 500
    link/none 
    inet 10.45.224.55/20 brd 10.45.239.255 scope global noprefixroute tun0
       valid_lft forever preferred_lft forever
    inet6 2620:52:0:2de0::1036/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::8618:43a9:b0a9:1c0/64 scope link stable-privacy proto kernel_ll 
       valid_lft forever preferred_lft forever

$ ip -4 route
default via 192.168.88.2 dev enp0s31f6 proto dhcp src 192.168.88.223 metric 100 
default via 192.168.88.2 dev wlp4s0 proto dhcp src 192.168.88.137 metric 600 
10.0.0.0/8 via 10.45.224.1 dev tun0 proto static metric 50 
10.45.224.0/20 dev tun0 proto kernel scope link src 10.45.224.55 metric 50 
91.209.10.250 via 192.168.88.2 dev enp0s31f6 proto static metric 50 
192.168.88.0/24 dev enp0s31f6 proto kernel scope link src 192.168.88.223 metric 100 
192.168.88.0/24 dev wlp4s0 proto kernel scope link src 192.168.88.137 metric 600 
192.168.88.2 dev enp0s31f6 proto static scope link metric 50 

$ ip -6 route
2620:52:0:2de0::/64 dev tun0 proto kernel metric 50 pref medium
2620:52::/48 via 2620:52:0:2de0::2 dev tun0 proto static metric 50 pref medium
2620:52:2::/48 via 2620:52:0:2de0::2 dev tun0 proto static metric 50 pref medium
2620:52:4::/48 via 2620:52:0:2de0::2 dev tun0 proto static metric 50 pref medium
2a03:3b40:296::/64 dev enp0s31f6 proto ra metric 100 pref medium
2a03:3b40:296::/64 dev wlp4s0 proto ra metric 600 pref medium
2a03:3b40:296::/48 via fe80::da58:d7ff:fe00:bb45 dev enp0s31f6 proto ra metric 100 pref medium
2a03:3b40:296::/48 via fe80::da58:d7ff:fe00:bb45 dev wlp4s0 proto ra metric 600 pref medium
2a05:7640::/33 via 2620:52:0:2de0::2 dev tun0 proto static metric 50 pref medium
fdc1:f7ea:bf32::/64 dev enp0s31f6 proto ra metric 100 pref medium
fdc1:f7ea:bf32::/64 dev wlp4s0 proto ra metric 600 pref medium
fdc1:f7ea:bf32::/48 via fe80::da58:d7ff:fe00:bb45 dev enp0s31f6 proto ra metric 100 pref medium
fdc1:f7ea:bf32::/48 via fe80::da58:d7ff:fe00:bb45 dev wlp4s0 proto ra metric 600 pref medium
fe80::/64 dev tun0 proto kernel metric 256 pref medium
fe80::/64 dev wlp4s0 proto kernel metric 1024 pref medium
fe80::/64 dev enp0s31f6 proto kernel metric 1024 pref medium
default via fe80::da58:d7ff:fe00:bb45 dev enp0s31f6 proto ra metric 100 pref medium
default via fe80::da58:d7ff:fe00:bb45 dev wlp4s0 proto ra metric 20600 pref medium
pemensik commented 2 months ago
Running cache service:
unbound
Config present in service:
{
    "ko.home.arpa": [
        "192.168.88.2",
        "fdc1:f7ea:bf32::2",
        "192.168.88.2",
        "fdc1:f7ea:bf32::2"
    ],
    ".": [
        "192.168.88.2",
        "fdc1:f7ea:bf32::2",
        "192.168.88.2",
        "fdc1:f7ea:bf32::2"
    ],
    "redhat.com": [
        "10.45.248.15",
        "10.38.5.26"
    ]
}
State of Dnsconfd:
RUNNING
Info about interfaces: [
    {
        "domains": [
            [
                "ko.home.arpa",
                false
            ]
        ],
        "servers": [
            "192.168.88.2",
            "fdc1:f7ea:bf32::2"
        ],
        "dns_over_tls": false,
        "dnssec": false,
        "is_default": 1,
        "interface_name": "enp0s31f6"
    },
    {
        "domains": [
            [
                "ko.home.arpa",
                false
            ]
        ],
        "servers": [
            "192.168.88.2",
            "fdc1:f7ea:bf32::2"
        ],
        "dns_over_tls": false,
        "dnssec": false,
        "is_default": 1,
        "interface_name": "wlp4s0"
    },
    {
        "domains": [
            [
                "redhat.com",
                false
            ]
        ],
        "servers": [
            "10.x.y.15",
            "10.x2.y2.26"
        ],
        "dns_over_tls": false,
        "dnssec": false,
        "is_default": 0,
        "interface_name": "tun0"
    }
]
TomasKorbar commented 1 week ago

Fixed with >= 1.4.2

pemensik commented 1 week ago

Confirm that it passes even with IPv6 addresses present on the f40 system.