File: 0013-Fix-EAM-mapping-host-addressess.patch

package info (click to toggle)
tayga 0.9.2-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 768 kB
  • sloc: ansic: 7,135; sh: 1,234; makefile: 18
file content (15 lines) | stat: -rw-r--r-- 694 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: Fix EAM mapping for host addressess
Origin: https://github.com/apalrd/tayga/pull/12/commits/ac2a805e10360c41bfe58b18d9391d6fe6a3421a
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082060
Bug: https://github.com/apalrd/tayga/issues/2
Applied-Upstream: https://github.com/apalrd/tayga/commit/68cc06f97dcbdaa8de8ed0eb61783500b822e408
--- a/addrmap.c
+++ b/addrmap.c
@@ -95,6 +95,7 @@ int is_private_ip4_addr(const struct in_
 int calc_ip4_mask(struct in_addr *mask, const struct in_addr *addr, int len)
 {
 	mask->s_addr = htonl(~(0xffffffff >> len));
+	if (len == 32) mask->s_addr = 0xffffffff;
 	if (addr && (addr->s_addr & ~mask->s_addr))
 		return -1;
 	return 0;