mirror of
https://github.com/neocturne/fastd.git
synced 2025-05-23 15:45:08 +02:00
config: move packet mark support check to Bison file
This commit is contained in:
parent
b2e576bb17
commit
6a529155f1
3 changed files with 7 additions and 4 deletions
|
@ -545,10 +545,6 @@ void fastd_configure(int argc, char *const argv[]) {
|
|||
|
||||
/** Performs some basic checks on the configuration */
|
||||
static void config_check_base(void) {
|
||||
#ifndef USE_PACKET_MARK
|
||||
if (conf.packet_mark)
|
||||
exit_error("config error: setting a packet mark is not supported on this system");
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Performs more checks on the configuration */
|
||||
|
|
|
@ -362,7 +362,12 @@ bind_default:
|
|||
;
|
||||
|
||||
packet_mark: TOK_UINT {
|
||||
#ifdef USE_PACKET_MARK
|
||||
conf.packet_mark = $1;
|
||||
#else
|
||||
fastd_config_error(&@$, state, "setting a packet mark is not supported on this system");
|
||||
YYERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
mtu: TOK_UINT {
|
||||
|
|
|
@ -206,7 +206,9 @@ struct fastd_config {
|
|||
uint16_t mtu; /**< The configured MTU */
|
||||
fastd_mode_t mode; /**< The configured mode of operation */
|
||||
|
||||
#ifdef USE_PACKET_MARK
|
||||
uint32_t packet_mark; /**< The configured packet mark (or 0) */
|
||||
#endif
|
||||
bool forward; /**< Specifies if packet forwarding is enable */
|
||||
bool secure_handshakes; /**< Can be set to false to support connections with fastd versions before v11 */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue