diff --git a/bpfloader/Android.bp b/bpfloader/Android.bp index 2ddf463..981c207 100644 --- a/bpfloader/Android.bp +++ b/bpfloader/Android.bp @@ -51,7 +51,8 @@ cc_binary { init_rc: ["bpfloader.rc"], required: [ - "timeInState.o" + "netbpfload", + "timeInState.o", ], product_variables: { diff --git a/bpfloader/bpfloader.rc b/bpfloader/bpfloader.rc index 1f4016d..1f7f815 100644 --- a/bpfloader/bpfloader.rc +++ b/bpfloader/bpfloader.rc @@ -16,6 +16,7 @@ # on load_bpf_programs exec_start bpfloader + exec_start netbpfload service bpfloader /system/bin/bpfloader capabilities CHOWN SYS_ADMIN @@ -82,3 +83,14 @@ service bpfloader /system/bin/bpfloader reboot_on_failure reboot,bpfloader-failed # we're not really updatable, but want to be able to load bpf programs shipped in apexes updatable + +# Note: comments for 'bpfloader' from up above also apply here. +# Use: adb logcat -s 'NetBpfLoad:*' 'NetBpfLoader:*' +service netbpfload /system/bin/netbpfload + capabilities CHOWN SYS_ADMIN NET_ADMIN + group root network_stack net_admin net_bw_acct net_bw_stats net_raw system + user root + rlimit memlock 1073741824 1073741824 + oneshot + reboot_on_failure reboot,netbpfload-failed + updatable