~vcs-imports/ipfire/ipfire-2.x

« back to all changes in this revision

Viewing changes to lfs/linux

  • Committer: Peter Müller
  • Date: 2022-04-23 14:27:56 UTC
  • mto: This revision was merged to the branch mainline in revision 9750.
  • Revision ID: git-v1:7a981d94cb2c3e48ecaf07c506c8353a2c839d79
SSH: do not send spoofable TCP keep alive messages

By default, both SSH server and client rely on TCP-based keep alive
messages to detect broken sessions, which can be spoofed rather easily
in order to keep a broken session opened (and vice versa).

Since we rely on SSH-based keep alive messages, which are not vulnerable
to this kind of tampering, there is no need to double-check connections
via TCP keep alive as well.

This patch thereof disables using TCP keep alive for both SSH client and
server scenario. For usability reasons, a timeout of 5 minutes (10
seconds * 30 keep alive messages = 300 seconds) will be used for both
client and server configuration, as 60 seconds were found to be too
short for unstable connectivity scenarios.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
###############################################################################
2
2
#                                                                             #
3
3
# IPFire.org - A linux based firewall                                         #
4
 
# Copyright (C) 2007-2023  IPFire Team  <info@ipfire.org>                     #
 
4
# Copyright (C) 2007-2022  IPFire Team  <info@ipfire.org>                     #
5
5
#                                                                             #
6
6
# This program is free software: you can redistribute it and/or modify        #
7
7
# it under the terms of the GNU General Public License as published by        #
24
24
 
25
25
include Config
26
26
 
27
 
VER         = 6.1.57
28
 
ARM_PATCHES = 6.1.y-ipfire2
 
27
VER         = 5.15.35
 
28
ARM_PATCHES = 5.15-ipfire5
29
29
 
30
30
THISAPP    = linux-$(VER)
31
31
DL_FILE    = linux-$(VER).tar.xz
44
44
        KERNEL_TARGET = Image
45
45
endif
46
46
 
 
47
ifeq "$(BUILD_ARCH)" "armv6l"
 
48
        KERNEL_ARCH  = arm
 
49
        KERNEL_TARGET = zImage
 
50
endif
 
51
 
47
52
ifeq "$(BUILD_ARCH)" "riscv64"
48
53
        KERNEL_ARCH   = riscv
49
54
        KERNEL_TARGET = Image.gz
67
72
###############################################################################
68
73
# Top-level Rules
69
74
###############################################################################
70
 
 
71
 
objects = \
72
 
        $(DL_FILE) \
 
75
objects =$(DL_FILE) \
73
76
        arm-multi-patches-$(ARM_PATCHES).patch.xz
74
77
 
75
78
$(DL_FILE)                                      = $(URL_IPFIRE)/$(DL_FILE)
76
79
arm-multi-patches-$(ARM_PATCHES).patch.xz       = $(URL_IPFIRE)/arm-multi-patches-$(ARM_PATCHES).patch.xz
77
80
 
78
 
$(DL_FILE)_BLAKE2 = 9fd3b4ffdc392d2bedf1b9366fdd773e006c7148756420ae621285874bb2ec9461199871579ba713ce5df1831ace7392969a97f2d5b90b08695f632b97655f9d
79
 
arm-multi-patches-$(ARM_PATCHES).patch.xz_BLAKE2 = 7afc460562fb24bcd75784fc79de768f9b60780aedd88d1a847927169e31920bbb475b1ac1466c4a224a7876d16bd8d465b96202de12b74f6e2ccbfcec731ad3
 
81
$(DL_FILE)_BLAKE2 = 15f1af609ae4a233dc6bdae84c1231c2335be6320ddbb9a5d76c7983498a9ca72c13b55cc1408dac477f707fb84df99435994c1a7eeb91396481c2f7b11ecc2e
 
82
arm-multi-patches-$(ARM_PATCHES).patch.xz_BLAKE2 = 58a70e757a9121a0aac83604a37aa787ec7ac0ee4970c5a3ac3bcb2dbaca32b00089cae6c0da5cf2fe0a2e156427b5165c6a86e0371a3e896f4c7cdd699c34a0
80
83
 
81
84
install : $(TARGET)
82
85
 
113
116
        ln -svf linux-$(VER) $(DIR_SRC)/linux
114
117
 
115
118
        # Layer7-patch
116
 
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-6.1.56-layer7.patch
 
119
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.15.17-layer7.patch
117
120
 
118
121
        # DVB Patches
119
122
        cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch
140
143
        # https://bugzilla.ipfire.org/show_bug.cgi?id=12760
141
144
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-5.15-NFQUEUE-Hold-RCU-read-lock-while-calling-nf_reinject.patch
142
145
 
143
 
        # Fix external module compile
144
 
        cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/linux/linux-6.0-fix_external_module_build.patch
145
 
 
 
146
ifeq "$(BUILD_ARCH)" "armv6l"
 
147
        # Apply Arm-multiarch kernel patches.
 
148
        cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1
 
149
endif
146
150
ifeq "$(BUILD_ARCH)" "aarch64"
147
151
        # Apply Arm-multiarch kernel patches.
148
152
        cd $(DIR_APP) && xzcat $(DIR_DL)/arm-multi-patches-$(ARM_PATCHES).patch.xz | patch -Np1
183
187
        cd $(DIR_APP) && cp -v .config /boot/config-$(VER)-$(VERSUFIX)
184
188
        cd $(DIR_APP) && make $(MAKETUNING) modules_install
185
189
 
186
 
ifneq "$(BUILD_PLATFORM)" "x86"
 
190
ifeq "$(BUILD_PLATFORM)" "arm"
187
191
        cd $(DIR_APP) && make $(MAKETUNING) dtbs
188
192
        mkdir -p /boot/dtb-$(VER)-$(VERSUFIX)
189
193
        cd $(DIR_APP)/arch/$(KERNEL_ARCH)/boot/dts && for f in $$(find -name "*.dtb"); do \