カーネルで大文字と小文字が異なるファイル

カーネルで大文字と小文字が異なるファイル

現在、レプリケーションカーネル(094226ad94f4)は、大文字と小文字を区別しないファイルシステムでこの競合を引き起こします。

  'include/uapi/linux/netfilter/xt_CONNMARK.h'
  'include/uapi/linux/netfilter/xt_connmark.h'
  'include/uapi/linux/netfilter/xt_DSCP.h'
  'include/uapi/linux/netfilter/xt_dscp.h'
  'include/uapi/linux/netfilter/xt_MARK.h'
  'include/uapi/linux/netfilter/xt_mark.h'
  'include/uapi/linux/netfilter/xt_RATEEST.h'
  'include/uapi/linux/netfilter/xt_rateest.h'
  'include/uapi/linux/netfilter/xt_TCPMSS.h'
  'include/uapi/linux/netfilter/xt_tcpmss.h'
  'include/uapi/linux/netfilter_ipv4/ipt_ECN.h'
  'include/uapi/linux/netfilter_ipv4/ipt_ecn.h'
  'include/uapi/linux/netfilter_ipv4/ipt_TTL.h'
  'include/uapi/linux/netfilter_ipv4/ipt_ttl.h'
  'include/uapi/linux/netfilter_ipv6/ip6t_HL.h'
  'include/uapi/linux/netfilter_ipv6/ip6t_hl.h'
  'net/netfilter/xt_DSCP.c'
  'net/netfilter/xt_dscp.c'
  'net/netfilter/xt_HL.c'
  'net/netfilter/xt_hl.c'
  'net/netfilter/xt_RATEEST.c'
  'net/netfilter/xt_rateest.c'
  'net/netfilter/xt_TCPMSS.c'
  'net/netfilter/xt_tcpmss.c'
  'tools/memory-model/litmus-tests/Z6.0+pooncelock+poonceLock+pombonce.litmus'
  'tools/memory-model/litmus-tests/Z6.0+pooncelock+pooncelock+pombonce.litmus'

誰でも私に説明できますか?なぜ名前がわずかに異なる各ヘッダーファイルのコピーが2つずつあると思いますか?

ベストアンサー1

すべてのLinuxファイルシステムは大文字と小文字を区別するため、Linuxカーネルのソースコードは大文字と小文字を区別しません。

これらはそれぞれ似ていますが、まったく同じコードではありません。

たとえば、これらの2つは同様の概念について異なるものです。カーネル構成オプションから選択できます。

競合バージョンは次の場所にありますxt_hl.c

IP tables module for matching the value of the TTL
Hop Limit matching module

config NETFILTER_XT_MATCH_HL
tristate '"hl" hoplimit/TTL match support'
depends on NETFILTER_ADVANCED
help
HL matching allows you to match packets based on the hoplimit
in the IPv6 header, or the time-to-live field in the IPv4
header of the packet.

Match では、iptables ルールを作成して、特定のホップ制限を見つけることができます。

ターゲットバージョンは次の場所にありますxt_HL.c

TTL modification target for IP tables
Hop Limit modification target for ip6tables

config NETFILTER_XT_TARGET_HL
tristate '"HL" hoplimit target support'
depends on IP_NF_MANGLE || IP6_NF_MANGLE
depends on NETFILTER_ADVANCED
help
This option adds the "HL" (for IPv6) and "TTL" (for IPv4)
targets, which enable the user to change the
hoplimit/time-to-live value of the IP header.

While it is safe to decrement the hoplimit/TTL value, the
modules also allow to increment and set the hoplimit value of
the header to arbitrary values. This is EXTREMELY DANGEROUS
since you can easily create immortal packets that loop
forever on the network.

Target には、パケットホップ制限を変更する iptables ルールの作成のサポートが追加されました。

コードは、IP テーブルとホップ制限の処理と似ています。

おすすめ記事