Skip to content

网络支持 ​

网络支持的组件名称为 networking_support, 相关内核选项为

ini
# Networking support
CONFIG_NET=y

# Networking support
# -> Networking options
# -> TCP/IP networking
CONFIG_INET=y

# Networking support
# -> Networking options
# -> TCP/IP networking
# -> The IPv6 protocol
CONFIG_IPV6=y

# Networking support
# -> Networking options
# -> QoS and/or fair queueing
CONFIG_NET_SCHED=y

检查工具为

bash
#!/opt/sum/bin/bash

source ./kernel_config_utils.sh
source ./net_utils.sh

networking_support_check() {
    is_error=false
    if ! kernel_config_check CONFIG_NET; then
        is_error=true
    fi
    if ! kernel_config_check CONFIG_INET; then
        is_error=true
    fi
    if ! kernel_config_check CONFIG_IPV6; then
        is_error=true
    fi
    if ! kernel_config_check CONFIG_NET_SCHED; then
        is_error=true
    fi
    if [ "$is_error" == "true" ]; then
        return 1
    fi

    return 0
}

TLS 协议 ​

TLS 协议的组件名称为 tls, 相关内核选项为

ini
# Networking support
# -> Networking options
# -> Transport Layer Security support
CONFIG_TLS=y

检查工具为

bash
#!/opt/sum/bin/bash

source ./kernel_config_utils.sh
source ./net_utils.sh

tls_check() {
    if ! kernel_config_check CONFIG_TLS tls; then
        return 1
    fi
}

内核选项 TLS 在 Linux v4.13 中引入, 相关提交为 3c4d7559159bfe1e3b94df3a657b2cda3a34e218.

L2TP 协议 ​

L2TP 协议的组件名称为 l2tp, 依赖于拨号上网, 相关内核选项为

ini
# Networking support
# -> Networking options
# -> Layer Two Tunneling Protocol (L2TP)
CONFIG_L2TP=y

# Networking support
# -> Networking options
# -> Layer Two Tunneling Protocol (L2TP)
# -> L2TPv3 support
CONFIG_L2TP_V3=y

# Device Drivers
# -> Network device support
# -> Network core driver support
# -> PPP (point-to-point protocol) support
# -> PPP over L2TP
CONFIG_PPPOL2TP=y

检查工具为

bash
#!/bin/bash

source ./kernel_config_utils.sh

l2tp_check() {
    local is_error

    is_error="false"
    if ! kernel_config_check CONFIG_L2TP l2tp_core; then
        is_error="true"
    fi
    if ! kernel_config_check CONFIG_L2TP_V3; then
        is_error="true"
    fi
    if ! kernel_config_check CONFIG_PPPOL2TP pppox; then
        is_error="true"
    fi
    if [ "$is_error" == "true" ]; then
        return 1
    fi

    return 0
}