Displaying OS in the dhcp.lease file

Hi all ,
i am using a package dnsmasq-dhcpv6 - 2.85
and the detail of my device is hereby

{
	"kernel": "4.4.60",
	"hostname": "*****",
	"model": "******, Inc. IPQ807x\/AP-HK09",
	"release": {
		"distribution": "OpenWrt",
		"version": "Chaos Calmer",
		"revision": "0ea36ba+r49254",
		"codename": "chaos_calmer",
		"target": "ipq\/ipq807x_64",
		"description": "OpenWrt Chaos Calmer 15.05.1"
	}
}

on hitting tcpdump cmd
tcpdump -i br-lan udp port 67 -vv
it shows the client info as

Client-Ethernet-Address b8:a8:25:da:ee:f8 (oui Unknown)
	  Vendor-rfc1048 Extensions
	    Magic Cookie 0x63825363
	    DHCP-Message Option 53, length 1: Discover
	    Client-ID Option 61, length 7: ether b8:a8:25:da:ee:f8
	    MSZ Option 57, length 2: 1500
	    Vendor-Class Option 60, length 15: "android-dhcp-14"
	    Hostname Option 12, length 11: "Zenil-s-A55"
	    Parameter-Request Option 55, length 12: 
	      Subnet-Mask, Default-Gateway, Domain-Name-Server, Domain-Name
	      MTU, BR, Lease-Time, RN
	      RB, Vendor-Option, URL, Option 108

here i want to show this option 60 i.e OS of the device (Android 14) in the dhcp.lease file
any insights about how it will possible..?

From last time, you upgraded the dnsmasq package and removed the patches without answering what patches and you still run a obsolete version of OpenWrt.

1 Like

all the patches that were embedded with the package 2.85 in the git repo

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

1 Like

i just want to change in the source of package dnsmasq which is in openwrt repo. the change required must be in the c file which is making the dhcp.lease file to add the vendor class info .
so i dont think there is any difference if i am using a different firmware version as the package is openwrt repo

https://thekelleys.org.uk/dnsmasq/dnsmasq-2.85.tar.gz
here is the src of the package

If you actually want to change something you have two mayor problems.

  1. You MUST run main source code to begin with, and you must make the openwrt patch you want from there. Not a single person in the world will care about your patch idea if you run a OpenWrt from 2015!

  2. Current OpenWrt main dnsmasq version is 2.90 so your 2.85 is also old even for dev work.

1 Like

does that URL look like it's coming from openwrt ?

you're asking in the wrong place, running on an unsupported openwrt spin off.

2 Likes

The link is to the actual dnsmasq owners own webpage.

The dnsmasq source code is one thing. But on top of that OpenWrt have a humongous big pile of patches to make it connect to the OpenWrt system and that connection have tree layers of config files to make it work at runtime.

1 Like

that might be the case, but we don't know the patches applied (or not applied) to the package OP is using, I also assume he's patching the main code, not the openwrt specific features ...

their device is supported by openwrt, there's no real reason for using the stock fw, and hack the old version(s) of dnsmasq, etc.

2 Likes