openwrt / openwrt/mdnsd

umdns gen wrap /wrong json data

Open
#1 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
7
Forks
20
PR merge metrics
No merged PRs in 30d

Description

ubus call umdns browse
output:

{
	"_dawn._tcp": {
		"MESH-AGENT_E4671E37EC68": {
			"ipv4": "192.168.15.106",
			"ipv6": "fdd5:d636:7052::1",
			"ipv6": "fe80::e667:1eff:fe37:ec68",
			"port": 1026
		},
		"MESH-AGENT_E4671E37EC54": {
			"ipv4": "192.168.15.236",
			"ipv6": "fd0e:6d62:cc45::1",
			"ipv6": "fe80::e667:1eff:fe37:ec54",
			"port": 1026
		},
		"MESH-AGENT_E4671E37EC95": {
			"ipv4": "192.168.15.151",
			"ipv6": "fd2b:8175:aa9b::1",
			"ipv6": "fe80::e667:1eff:fe37:ec95",
			"port": 1026
		},
		"MESH-AGENT_E4671E37EC8B": {
			"ipv4": "192.168.16.1",
			"ipv6": "fda8:42e8:8129::1",
			"ipv6": "fe80::e667:1eff:fe37:ec8b",
			"ipv4": "192.168.15.141",
			"port": 1026
		}
	},
	"_ssh._tcp": {
		"MESH-AGENT_E4671E37EC68": {
			"ipv4": "192.168.15.106",
			"ipv6": "fdd5:d636:7052::1",
			"ipv6": "fe80::e667:1eff:fe37:ec68",
			"port": 22,
			"txt": "daemon=dropbear"
		},
		"MESH-AGENT_E4671E37EC54": {
			"ipv4": "192.168.15.236",
			"ipv6": "fd0e:6d62:cc45::1",
			"ipv6": "fe80::e667:1eff:fe37:ec54",
			"port": 22,
			"txt": "daemon=dropbear"
		},
		"MESH-AGENT_E4671E37EC95": {
			"ipv4": "192.168.15.151",
			"ipv6": "fd2b:8175:aa9b::1",
			"ipv6": "fe80::e667:1eff:fe37:ec95",
			"port": 22,
			"txt": "daemon=dropbear"
		},
		"MESH-AGENT_E4671E37EC8B": {
			"ipv4": "192.168.16.1",
			"ipv6": "fda8:42e8:8129::1",
			"ipv6": "fe80::e667:1eff:fe37:ec8b",
			"ipv4": "192.168.15.141",
			"port": 22,
			"txt": "daemon=dropbear"
		}
	}
}

this json data is wrong, there is Duplicate key 'ipv6' 'ipv4'

@stintel

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the problem with ubus call umdns browse and inspect the mDNS browse response generation path. Confirm that each service entry emits unique ipv4 and ipv6 fields, then verify the resulting JSON no longer contains duplicate keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.