Skip to content

Commit

Permalink
Skip RTN_BROADCAST & RTN_MULTICAST route parsing in net_route.c
Browse files Browse the repository at this point in the history
Split cgroup code from resmem.c into resmem_cg.c.
cgroup code is still v1, and hence not tested.
v2 will be added later.

Signed-off-by: Anjali Kulkarni <[email protected]>
  • Loading branch information
anjalidk authored and hallyn committed Feb 2, 2024
1 parent 44b114a commit 41b251a
Show file tree
Hide file tree
Showing 10 changed files with 309 additions and 610 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CC = gcc
CFLAGS = -g -Wall -Werror -fPIC -std=gnu99
DEPS = resource.h resource_impl.h resmem.h resnet.h resproc.h resvm.h rescpu.h resfs.h stat.h
OBJ = resource.o resmem.o resnet.o resproc.o reskern.o resvm.o rescpu.o resfs.o net_if.o net_route.o net_arp.o stat.o
OBJ = resource.o resmem.o resnet.o resproc.o reskern.o resvm.o rescpu.o resfs.o net_if.o net_route.o net_arp.o stat.o resmem_cg.o
TEST = test
RM = rm -rf
CP = cp
Expand Down
4 changes: 4 additions & 0 deletions net_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ static int handle_route_resp(int net_sock, void **out)
#endif
parse_attr(at, RTM_RTA(rt), len);
if (rt->rtm_family == AF_INET || rt->rtm_family == AF_INET6) {
if ((rt->rtm_type == RTN_BROADCAST) ||
(rt->rtm_type == RTN_MULTICAST))
continue;

get_attr(at, iroutes, rt);
#ifdef TESTING
fp = fopen ("./route_info.txt", "w");
Expand Down
Loading

0 comments on commit 41b251a

Please sign in to comment.