1
1
Files
zyxel-vmg8825_b50b-cfw/package/libs/ares/patches-1.1.1/001-ENHANCE_Support_Multi-Interface.patch
T
2026-04-17 18:33:03 +02:00

46 lines
1.4 KiB
Diff
Executable File

Index: ares-1.1.1/ares_private.h
===================================================================
--- ares-1.1.1.orig/ares_private.h 2015-11-25 14:53:29.272441538 +0800
+++ ares-1.1.1/ares_private.h 2015-11-25 14:53:29.432521543 +0800
@@ -115,6 +115,9 @@
/* Active queries */
struct query *queries;
+
+ /*ZyXEL To support Multi-interface*/
+ unsigned int ifMark; //interface Mark
};
void ares__send_query(ares_channel channel, struct query *query, time_t now);
Index: ares-1.1.1/ares_process.c
===================================================================
--- ares-1.1.1.orig/ares_process.c 2015-11-25 14:53:29.272441538 +0800
+++ ares-1.1.1/ares_process.c 2015-11-25 14:53:29.432521543 +0800
@@ -453,6 +453,12 @@
close(s);
return -1;
}
+ /*ZyXEL Multi-interface*/
+ //printf("Ares IfMark:%x\n", channel->ifMark);
+ if(setsockopt(s, SOL_SOCKET, SO_MARK, &channel->ifMark, sizeof(channel->ifMark)) == -1)
+ {
+ printf("<<Error>> Ares setsockopt failed!\n");
+ }
/* Connect to the server. */
memset(&sin, 0, sizeof(sin));
@@ -480,6 +486,13 @@
if (s == -1)
return -1;
+ /*ZyXEL Multi-interface*/
+ //printf("Ares IfMark:%x\n", channel->ifMark);
+ if(setsockopt(s, SOL_SOCKET, SO_MARK, &channel->ifMark, sizeof(channel->ifMark)) == -1)
+ {
+ printf("<<Error>> Ares setsockopt failed!\n");
+ }
+
/* Connect to the server. */
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;