Please confirm that:
- I have searched the issues and didn't find my bug or an answer to my question
- My bug is about JetBird and not something upstream
What is your JetBird version?
1.6.0
What make/model is your device?
Nothing Phone (2)
What OS and version are you running?
Android 16 (Pong-B4.1-260414-1749-EEA)
What happened?
Client crashes when applying a ::/0 route on an IPv4-only network with the "IPv6" toggle disabled (Bad address (null))
Summary
On a self-hosted, IPv4-only NetBird network (no IPv6 overlay addressing), the Android client still attempts to add an IPv6 default route (::/0) to the interface, even though the "IPv6" toggle is turned OFF in the app. The peer receives only an IPv4 overlay address (100.x.x.x/16) and has no IPv6 address. Applying ::/0 with no IPv6 source address fails with Bad address (null), which aborts the entire TUN interface creation and crashes the client. It then enters an infinite reconnect-crash loop. Turning the "IPv6" toggle off does not prevent this.
Environment
- App: jetbird (
dev.bg.jetbird) - NetBird client version:
0358be23 - Platform: android/arm64
- Management server: self-hosted, IPv4-only network (no IPv6 overlay addressing enabled)
- Peer receives an IPv4 overlay address (
100.x.x.x/16) and no IPv6 address - The "IPv6" toggle in the app is OFF, yet the client still tries to apply a
::/0route
Steps to reproduce
- Self-host a NetBird network that is IPv4-only (no IPv6 overlay addressing).
- Configure a default route / exit node (
0.0.0.0/0). - In jetbird on Android, turn OFF the "IPv6" toggle.
- Connect.
Expected behavior
On an IPv4-only network with the "IPv6" toggle off, the client should never attempt to add an IPv6 CIDR or ::/0 route to the interface, and the TUN interface should be created successfully.
Actual behavior
The IPv6 CIDR/route add fails, the whole TUN interface creation aborts, and the client crashes:
Adding CIDR block to interface 100.X.X.X/16
Adding IPv6 CIDR block to interface CIDR(route=::/0)
Failed to create tunnel Bad address (null)
[ERRO] device/device_android.go:75 failed to create Android interface: failed to get name of TUN device: inappropriate ioctl for device
[ERRO] internal/engine.go:518 failed creating tunnel interface wt0: [failed to get name of TUN device: inappropriate ioctl for device]
[ERRO] internal/connect.go:383 error while starting Netbird Connection Engine: create wg interface: failed to get name of TUN device: inappropriate ioctl for device
After the crash the client loops indefinitely, retrying from the Management connection step and crashing again. With Always-on VPN enabled this loops continuously.
Observations / suspected cause
- The network is IPv4-only and the peer gets only an IPv4 address, yet a
::/0route is still being applied to the interface. - Applying a
::/0route with no IPv6 source address on the interface producesBad address (null), which aborts the whole interface creation (inappropriate ioctl for device) and crashes the client. - The "IPv6" toggle has no effect on Android — the client still attempts the IPv6 route. The IPv6-disable behavior appears not to be wired up in the jetbird/Android path, or the
::/0route is not being filtered out when the IPv6 toggle is off / no IPv6 address is present.
Workarounds attempted
- Turning the "IPv6" toggle off in the app: does not work (the bug being reported).
- Removing/disabling the
0.0.0.0/0default route on the server side avoids the auto-added::/0, but disables full-tunnel routing.
Anonymized logs
See attached jetbird-anonymized-logs.txt. Domains, IP addresses, FQDN and peer IDs have been redacted.
Logs
[23:14:14.424] Starting NetBird
[23:14:14.424] Starting in foreground
[23:14:14.428] Netbird address changed - our fqdn: - our address:
[23:14:14.428] Netbird disconnected
[23:14:14.429] Tunnel setup complete
[23:14:14.429] Netbird peers update (0 peers)
[23:14:14.444] Network changed
[23:14:14.446] Netbird connecting
--------- beginning of main
[23:14:14.444] [INFO] android/client.go:169 Starting client without login with config: /data/user/0/dev.bg.jetbird/files/netbird.cfg, state: /data/user/0/dev.bg.jetbird/files/state.json
[23:14:14.444] [INFO] internal/connect.go:157 starting NetBird client version 0358be23 on android/arm64
[23:14:14.444] [DEBG] internal/connect.go:170 initialized client metrics
[23:14:14.446] [DEBG] internal/connect.go:256 connecting to the Management service mgmt.example.com:443
[23:14:14.453] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:443
[23:14:14.575] [DEBG] internal/connect.go:274 connected to the Management service mgmt.example.com:443
[23:14:14.614] [ERRO] system/info_android.go:116 getInfo: exit status 255
[23:14:14.810] Netbird address changed - our fqdn: peer.example.vnet - our address: 100.X.X.X/16
[23:14:14.810] [TRAC] metrics/influxdb.go:151 login metrics [selfhosted, success]: duration=0.235s
[23:14:14.811] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:80
[23:14:14.897] Netbird connected
[23:14:14.897] [DEBG] client/grpc.go:76 connected to Signal Service: mgmt.example.com:80
[23:14:14.899] [INFO] internal/connect.go:359 connecting to the Relay service(s): rel://mgmt.example.com:993
[23:14:14.899] [DEBG] client/manager.go:122 starting relay client manager with [rel://mgmt.example.com:993] relay servers
[23:14:14.899] [DEBG] client/picker.go:44 pick server from list: [rel://mgmt.example.com:993]
[23:14:14.899] [INFO] client/picker.go:71 try to connecting to relay server: rel://mgmt.example.com:993
[23:14:14.899] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:208 create new relay connection: local peerID: <REDACTED>, local peer hashedID: <REDACTED>
[23:14:14.899] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:214 connecting to relay server
[23:14:14.899] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:79 dialing Relay server via quic
[23:14:14.899] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:79 dialing Relay server via WS
[23:14:14.899] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:993
[23:14:14.969] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:104 successfully dialed via: WS
[23:14:14.970] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:90 connection attempt aborted via: quic
[23:14:15.014] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:236 relay connection established
[23:14:15.014] [INFO] client/picker.go:89 connected to Relay server: rel://mgmt.example.com:993
[23:14:15.014] [INFO] client/picker.go:63 chosen home Relay server: rel://mgmt.example.com:993
[23:14:15.015] [INFO] internal/engine.go:297 I am: <REDACTED>
[23:14:15.026] [DEBG] stdnet/filter.go:30 trying to create a wgctrl client failed with: socket: permission denied
[23:14:15.026] [DEBG] stdnet/filter.go:30 trying to create a wgctrl client failed with: socket: permission denied
[23:14:15.026] [INFO] wgproxy/factory_usp.go:15 WireGuard Proxy Factory will produce bind proxy
[23:14:15.077] [ERRO] system/info_android.go:116 getInfo: exit status 255
[23:14:15.298] [DEBG] internal/dns.go:149 added reverse DNS zone: 127.100.in-addr.arpa. with 8 records
[23:14:15.298] [DEBG] dns/server.go:245 host dns address list is: [192.0.0.1:53 [REDACTED_IPV6]:53]
[23:14:15.299] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.300] Netbird DNS ready
[23:14:15.302] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.302] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.305] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.305] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:15.306] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.307] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.307] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.309] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.309] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:15.309] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:15.309] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.310] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.310] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.311] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.311] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:15.311] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:15.311] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.312] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.312] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.313] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.313] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:15.313] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:15.313] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.314] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:15.314] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.315] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:15.315] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:15.315] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:15.315] [DEBG] dns/server.go:351 registering handler MgmtCacheResolver with priority 150 for [mgmt.example.com]
[23:14:15.315] [DEBG] dns/handler_chain.go:117 adding handler pattern: domain=mgmt.example.com. original: domain=mgmt.example.com. wildcard=false match_subdomain=false priority=150
[23:14:15.315] [TRAC] dns/handler_chain.go:194 handler chain (1):
[23:14:15.315] - pattern: domain=mgmt.example.com. original: domain=mgmt.example.com. wildcard=false match_subdomain=false priority=150
[23:14:15.315] [WARN] routemanager/manager.go:266 failed to load state: unmarshal states: unexpected end of JSON input
[23:14:15.319] Adding CIDR block to interface 100.X.X.X/16
[23:14:15.319] [INFO] routemanager/manager.go:256 Routing setup complete
[23:14:15.319] [INFO] device/device_android.go:54 create tun interface
[23:14:15.320] Adding IPv6 CIDR block to interface CIDR(route=::/0)
[23:14:15.320] Failed to create tunnel Bad address (null)
[23:14:15.324] [ERRO] device/device_android.go:75 failed to create Android interface: failed to get name of TUN device: inappropriate ioctl for device
[23:14:15.324] [ERRO] internal/engine.go:518 failed creating tunnel interface wt0: [failed to get name of TUN device: inappropriate ioctl for device]
[23:14:15.324] [DEBG] internal/engine.go:1790 removing Netbird interface wt0
[23:14:15.324] [INFO] iface/iface.go:336 interface has been removed
[23:14:15.324] [ERRO] internal/connect.go:383 error while starting Netbird Connection Engine: create wg interface: failed to get name of TUN device: inappropriate ioctl for device
[23:14:15.325] Netbird connecting
[23:14:15.325] Netbird address changed - our fqdn: - our address:
[23:14:15.326] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:737 closing all peer connections
[23:14:15.326] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:497 start to Relay read loop exit
[23:14:15.326] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:745 waiting for read loop to close
[23:14:15.326] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:747 relay connection closed
[23:14:15.326] [WARN] [relay: rel://mgmt.example.com:993] client/client.go:728 relay connection was already marked as not running
[23:14:17.073] [DEBG] internal/connect.go:256 connecting to the Management service mgmt.example.com:443
[23:14:17.074] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:443
[23:14:17.216] [DEBG] internal/connect.go:274 connected to the Management service mgmt.example.com:443
[23:14:17.287] [ERRO] system/info_android.go:116 getInfo: exit status 255
[23:14:17.491] [TRAC] metrics/influxdb.go:151 login metrics [selfhosted, success]: duration=0.274s
[23:14:17.492] Netbird address changed - our fqdn: peer.example.vnet - our address: 100.X.X.X/16
[23:14:17.493] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:80
[23:14:17.557] Netbird connected
[23:14:17.557] [DEBG] client/grpc.go:76 connected to Signal Service: mgmt.example.com:80
[23:14:17.559] [INFO] internal/connect.go:359 connecting to the Relay service(s): rel://mgmt.example.com:993
[23:14:17.559] [DEBG] client/manager.go:122 starting relay client manager with [rel://mgmt.example.com:993] relay servers
[23:14:17.559] [DEBG] client/picker.go:44 pick server from list: [rel://mgmt.example.com:993]
[23:14:17.559] [INFO] client/picker.go:71 try to connecting to relay server: rel://mgmt.example.com:993
[23:14:17.559] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:208 create new relay connection: local peerID: <REDACTED>, local peer hashedID: <REDACTED>
[23:14:17.560] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:214 connecting to relay server
[23:14:17.560] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:79 dialing Relay server via quic
[23:14:17.560] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:79 dialing Relay server via WS
[23:14:17.560] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:993
[23:14:17.635] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:104 successfully dialed via: WS
[23:14:17.635] [INFO] [relay: rel://mgmt.example.com:993] dialer/race_dialer.go:90 connection attempt aborted via: quic
[23:14:17.674] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:236 relay connection established
[23:14:17.675] [INFO] client/picker.go:89 connected to Relay server: rel://mgmt.example.com:993
[23:14:17.675] [INFO] client/picker.go:63 chosen home Relay server: rel://mgmt.example.com:993
[23:14:17.675] [INFO] internal/engine.go:297 I am: <REDACTED>
[23:14:17.677] [DEBG] stdnet/filter.go:30 trying to create a wgctrl client failed with: socket: permission denied
[23:14:17.678] [DEBG] stdnet/filter.go:30 trying to create a wgctrl client failed with: socket: permission denied
[23:14:17.678] [INFO] wgproxy/factory_usp.go:15 WireGuard Proxy Factory will produce bind proxy
[23:14:17.726] [ERRO] system/info_android.go:116 getInfo: exit status 255
[23:14:17.940] Netbird DNS ready
[23:14:17.939] [DEBG] internal/dns.go:149 added reverse DNS zone: 127.100.in-addr.arpa. with 8 records
[23:14:17.939] [DEBG] dns/server.go:245 host dns address list is: [192.0.0.1:53 [REDACTED_IPV6]:53]
[23:14:17.940] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.941] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.941] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.943] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.943] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:17.944] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.946] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.946] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.947] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.947] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:17.947] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:17.947] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.948] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.948] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.949] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.949] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:17.949] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:17.949] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.951] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.951] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.953] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.953] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:17.953] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:17.954] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.955] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=A
[23:14:17.955] [INFO] mgmt/mgmt.go:406 looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.957] [INFO] mgmt/mgmt.go:411 done looking up IP for mgmt domain=mgmt.example.com type=AAAA
[23:14:17.957] [DEBG] mgmt/mgmt.go:203 added/updated domain=mgmt.example.com with 1 A records and 1 AAAA records
[23:14:17.957] [DEBG] mgmt/mgmt.go:586 added/updated management cache domain=mgmt.example.com
[23:14:17.957] [DEBG] dns/server.go:351 registering handler MgmtCacheResolver with priority 150 for [mgmt.example.com]
[23:14:17.957] [DEBG] dns/handler_chain.go:117 adding handler pattern: domain=mgmt.example.com. original: domain=mgmt.example.com. wildcard=false match_subdomain=false priority=150
[23:14:17.957] [TRAC] dns/handler_chain.go:194 handler chain (1):
[23:14:17.957] - pattern: domain=mgmt.example.com. original: domain=mgmt.example.com. wildcard=false match_subdomain=false priority=150
[23:14:17.958] [WARN] routemanager/manager.go:266 failed to load state: unmarshal states: unexpected end of JSON input
[23:14:17.962] [INFO] routemanager/manager.go:256 Routing setup complete
[23:14:17.962] Adding CIDR block to interface 100.X.X.X/16
[23:14:17.962] [INFO] device/device_android.go:54 create tun interface
[23:14:17.963] Adding IPv6 CIDR block to interface CIDR(route=::/0)
[23:14:17.963] Failed to create tunnel Bad address (null)
[23:14:17.965] Netbird connecting
[23:14:17.964] [ERRO] device/device_android.go:75 failed to create Android interface: failed to get name of TUN device: permission denied
[23:14:17.966] Netbird address changed - our fqdn: - our address:
[23:14:17.964] [ERRO] internal/engine.go:518 failed creating tunnel interface wt0: [failed to get name of TUN device: permission denied]
[23:14:17.964] [DEBG] internal/engine.go:1790 removing Netbird interface wt0
[23:14:17.964] [INFO] iface/iface.go:336 interface has been removed
[23:14:17.964] [ERRO] internal/connect.go:383 error while starting Netbird Connection Engine: create wg interface: failed to get name of TUN device: permission denied
[23:14:17.967] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:737 closing all peer connections
[23:14:17.967] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:497 start to Relay read loop exit
[23:14:17.967] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:745 waiting for read loop to close
[23:14:17.967] [INFO] [relay: rel://mgmt.example.com:993] client/client.go:747 relay connection closed
[23:14:17.967] [WARN] [relay: rel://mgmt.example.com:993] client/client.go:728 relay connection was already marked as not running
[23:14:20.871] [DEBG] internal/connect.go:256 connecting to the Management service mgmt.example.com:443
[23:14:20.872] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:443
[23:14:20.999] [DEBG] internal/connect.go:274 connected to the Management service mgmt.example.com:443
[23:14:21.053] [ERRO] system/info_android.go:116 getInfo: exit status 255
[23:14:21.340] Netbird address changed - our fqdn: peer.example.vnet - our address: 100.X.X.X/16
[23:14:21.339] [TRAC] metrics/influxdb.go:151 login metrics [selfhosted, success]: duration=0.340s
[23:14:21.341] [DEBG] net/dialer_dial.go:20 Dialing tcp mgmt.example.com:80
--- app crashes shortly after this point ---