Merge pull request #10992 from yuwata/follow-up-10948
network: make fib rule accept arbitrary ip protocol
This commit is contained in:
+18
-17
@@ -129,8 +129,8 @@ shared_sources = files('''
|
||||
serialize.h
|
||||
sleep-config.c
|
||||
sleep-config.h
|
||||
socket-protocol-list.c
|
||||
socket-protocol-list.h
|
||||
ip-protocol-list.c
|
||||
ip-protocol-list.h
|
||||
spawn-ask-password-agent.c
|
||||
spawn-ask-password-agent.h
|
||||
spawn-polkit-agent.c
|
||||
@@ -192,44 +192,45 @@ if conf.get('HAVE_KMOD') == 1
|
||||
shared_sources += files('module-util.c')
|
||||
endif
|
||||
|
||||
generate_socket_protocol_list = find_program('generate-socket-protocol-list.sh')
|
||||
socket_protocol_list_txt = custom_target(
|
||||
'socket-protocol-list.txt',
|
||||
output : 'socket-protocol-list.txt',
|
||||
command : [generate_socket_protocol_list, cpp],
|
||||
generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
|
||||
ip_protocol_list_txt = custom_target(
|
||||
'ip-protocol-list.txt',
|
||||
output : 'ip-protocol-list.txt',
|
||||
command : [generate_ip_protocol_list, cpp],
|
||||
capture : true)
|
||||
|
||||
fname = 'socket-protocol-from-name.gperf'
|
||||
fname = 'ip-protocol-from-name.gperf'
|
||||
gperf_file = custom_target(
|
||||
fname,
|
||||
input : socket_protocol_list_txt,
|
||||
input : ip_protocol_list_txt,
|
||||
output : fname,
|
||||
command : [generate_gperfs, 'socket_protocol', 'IPPROTO_', '@INPUT@'],
|
||||
command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
fname = 'socket-protocol-from-name.h'
|
||||
fname = 'ip-protocol-from-name.h'
|
||||
target1 = custom_target(
|
||||
fname,
|
||||
input : gperf_file,
|
||||
output : fname,
|
||||
command : [gperf,
|
||||
'-L', 'ANSI-C', '-t', '--ignore-case',
|
||||
'-N', 'lookup_socket_protocol',
|
||||
'-H', 'hash_socket_protocol_name',
|
||||
'-N', 'lookup_ip_protocol',
|
||||
'-H', 'hash_ip_protocol_name',
|
||||
'-p', '-C',
|
||||
'@INPUT@'],
|
||||
capture : true)
|
||||
|
||||
fname = 'socket-protocol-to-name.h'
|
||||
awkscript = 'socket-protocol-to-name.awk'
|
||||
fname = 'ip-protocol-to-name.h'
|
||||
awkscript = 'ip-protocol-to-name.awk'
|
||||
target2 = custom_target(
|
||||
fname,
|
||||
input : [awkscript, socket_protocol_list_txt],
|
||||
input : [awkscript, ip_protocol_list_txt],
|
||||
output : fname,
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
shared_sources += [target1, target2]
|
||||
shared_generated_gperf_headers = [target1, target2]
|
||||
shared_sources += shared_generated_gperf_headers
|
||||
|
||||
libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user