Skip to content

Commit cef8b3d

Browse files
committed
Merge branch '202205' of https://github.com/sonic-net/sonic-buildimage into 202205
2 parents 07df43d + 0f865fa commit cef8b3d

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

rules/debootstrap.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# debootstrap package
22

3-
DEBOOTSTRAP_VERSION = 1.0.123+deb11u1
3+
DEBOOTSTRAP_VERSION = 1.0.123+deb11u2
44

55
export DEBOOTSTRAP_VERSION
66

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 079ff1bb570dae96c4ca513e210c9856e9cc75b0 Mon Sep 17 00:00:00 2001
2+
From: Saikrishna Arcot <[email protected]>
3+
Date: Wed, 10 Jan 2024 23:30:17 -0800
4+
Subject: [PATCH] Don't look up the ifindex for fallback
5+
6+
If sending a packet on the "fallback" interface, then don't try to get the
7+
ifindex for that interface. There will never be an actual interface named
8+
"fallback" in SONiC (at least, not one that we will want to use).
9+
10+
This might save 0.009-0.012 seconds per upstream server, and when there
11+
are as many as 48 upstream servers, it can save about 0.4-0.5 seconds of
12+
time. This then allows dhcrelay to process more packets.
13+
14+
Signed-off-by: Saikrishna Arcot <[email protected]>
15+
16+
diff --git a/common/socket.c b/common/socket.c
17+
index da9f501..e707a7f 100644
18+
--- a/common/socket.c
19+
+++ b/common/socket.c
20+
@@ -767,7 +767,10 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
21+
memcpy(&dst, to, sizeof(dst));
22+
m.msg_name = &dst;
23+
m.msg_namelen = sizeof(dst);
24+
- ifindex = if_nametoindex(interface->name);
25+
+ if (strcmp(interface->name, "fallback") != 0)
26+
+ ifindex = if_nametoindex(interface->name);
27+
+ else
28+
+ ifindex = 0;
29+
30+
/*
31+
* Set the data buffer we're sending. (Using this wacky
32+
--
33+
2.34.1
34+

src/isc-dhcp/patch/series

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@
1212
0011-dhcp-relay-Prevent-Buffer-Overrun.patch
1313
0012-add-option-si-to-support-using-src-intf-ip-in-relay.patch
1414
0013-Fix-dhcrelay-agent-option-buffer-pointer-logic.patch
15+
0016-Don-t-look-up-the-ifindex-for-fallback.patch

0 commit comments

Comments
 (0)