[PATCH] ipset: Fix ethernet address parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Currently ipset would not parse ether addresses which are not exactly
17 characters long, for ex. 1:2:3:4:5:6

I've ran into this problem when trying to do fancy things with ISC
DHCP scripts/events, which gladly skips zeroes in front of address
element, at least in a way I was doing it.

on commit {
  set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
  set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));

  execute("sudo", "/usr/sbin/ipset", "add", "-exist", "dynnet",
concat( ClientIP, ",", ClientMac));
}

Best regards,
JJ

Attachment: lib_parse.patch
Description: Binary data


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux