aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2023-10-24 06:18:59 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-24 06:18:59 +0000
commitb37a9e65d09063733beedf45ddcd53b5e2f6fd46 (patch)
treec13472d6baa12a26b2427a040b642a7524fa6aa2
parent0a8ee35316eb4e4c3377f9a57a28e73a5cfb8acc (diff)
parent2f7a7bc2876128cb8af139be42a18ae15fa6c4d9 (diff)
downloadiptables-b37a9e65d09063733beedf45ddcd53b5e2f6fd46.tar.gz
Merge "Revert "ANDROID: extensions/libxt_LOG.c: manually define prioritynames[]"" into main am: 2f7a7bc287android-u-qpr3-beta-1-gplandroid-u-qpr2-beta-2-gpl
Original change: https://android-review.googlesource.com/c/platform/external/iptables/+/2800994 Change-Id: I2cd45d9d4c0377e7ebe3f005bf20f7a5582e7cc9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--extensions/libxt_LOG.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/extensions/libxt_LOG.c b/extensions/libxt_LOG.c
index d930bb97..b6fe0b2e 100644
--- a/extensions/libxt_LOG.c
+++ b/extensions/libxt_LOG.c
@@ -1,34 +1,7 @@
#include <stdio.h>
#include <string.h>
-#ifndef __BIONIC__
#define SYSLOG_NAMES
#include <syslog.h>
-#else /* __BIONIC__ */
-#include <syslog.h>
-/* 'prioritynames[]' should come from syslog.h, but bionic doesn't provide it...
- * It is a lookup array from a string name to a non unique LOG_* value,
- * but it can also be used in reverse (in which case first match wins),
- * so the order matters.
- * iptables 1.8.9 only uses it for the level -> name lookup.
- */
-static const struct {
- const char * const c_name;
- const int c_val;
-} prioritynames[] = {
- { .c_name = "emerg", .c_val = LOG_EMERG, },
- { .c_name = "panic", .c_val = LOG_EMERG, },
- { .c_name = "alert", .c_val = LOG_ALERT, },
- { .c_name = "crit", .c_val = LOG_CRIT, },
- { .c_name = "err", .c_val = LOG_ERR, },
- { .c_name = "error", .c_val = LOG_ERR, },
- { .c_name = "warn", .c_val = LOG_WARNING, },
- { .c_name = "warning", .c_val = LOG_WARNING, },
- { .c_name = "notice", .c_val = LOG_NOTICE, },
- { .c_name = "info", .c_val = LOG_INFO, },
- { .c_name = "debug", .c_val = LOG_DEBUG, },
- { .c_name = NULL, .c_val = -1, },
-};
-#endif /* __BIONIC__ */
#include <xtables.h>
#include <linux/netfilter/xt_LOG.h>