bpfloader: start netbpfload after bpfloader am: c76a0dca67 am: 2fd19d3f6f am: 2e91202d7f

Original change: https://android-review.googlesource.com/c/platform/system/bpf/+/2780568

Change-Id: I316ce5e3d81c9682c2bdf7525506def2e9e0a9ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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 @@
     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 @@
     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