mdnsd: warn when -i cannot filter without CAP_NET_RAW #121
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Bob the Builder | |
| # Run on all branches, including all pull requests, except the 'dev' | |
| # branch since that's where we run Coverity Scan (limited tokens/day) | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| - '!dev' | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build: | |
| # Verify we can build on latest Ubuntu with both gcc and clang | |
| name: ${{ matrix.compiler }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| compiler: [gcc, clang] | |
| fail-fast: false | |
| env: | |
| MAKEFLAGS: -j3 | |
| CC: ${{ matrix.compiler }} | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install tree doxygen libcmocka-dev tshark tcpdump | |
| - uses: actions/checkout@v6 | |
| - name: Configure | |
| run: | | |
| ./autogen.sh | |
| ./configure --prefix= --disable-silent-rules --enable-tests | |
| - name: Build | |
| run: | | |
| make | |
| - name: Install to ~/tmp and Inspect | |
| run: | | |
| DESTDIR=~/tmp make install-strip | |
| tree ~/tmp | |
| LD_LIBRARY_PATH=~/tmp/lib ldd ~/tmp/sbin/mdnsd | |
| size ~/tmp/sbin/mdnsd | |
| size ~/tmp/lib/libmdnsd.so* | |
| LD_LIBRARY_PATH=~/tmp/lib ~/tmp/sbin/mdnsd -h | |
| - name: Enable unprivileged userns (unshare) | |
| run: | | |
| sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0 | |
| - name: Test | |
| run: | | |
| make check || (cat test/test-suite.log; false) | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: mdnsd-test-${{ matrix.compiler }} | |
| path: test/* | |
| asan: | |
| # Run the cmocka unit tests under AddressSanitizer and UBSan. This is | |
| # the gate for the use-after-free (#92), the reload leak (#93, caught by | |
| # LSan), and the NULL-to-nonnull in _a_match() (#94, caught by UBSan -- | |
| # -fno-sanitize-recover makes it fail rather than just warn). The unit | |
| # tests mock getifaddrs() and run directly (no namespace), so the run is | |
| # deterministic. The shell tests are not run here -- the daemon's | |
| # leak-on-exit under a signal would make the run flaky. | |
| name: asan | |
| runs-on: ubuntu-latest | |
| env: | |
| MAKEFLAGS: -j3 | |
| CC: clang | |
| CFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=undefined -g -O1 | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install clang libcmocka-dev | |
| - uses: actions/checkout@v6 | |
| - name: Configure | |
| run: | | |
| ./autogen.sh | |
| ./configure --prefix= --enable-tests | |
| - name: Build and unit test under AddressSanitizer and UBSan | |
| run: | | |
| make check TESTS="xht addr answer label sdtxt conflict" || (cat test/test-suite.log; false) | |
| distcheck: | |
| runs-on: ubuntu-latest | |
| env: | |
| MAKEFLAGS: -j3 | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -y install tree doxygen libcmocka-dev | |
| - uses: actions/checkout@v6 | |
| - name: Configure | |
| run: | | |
| ./autogen.sh | |
| ./configure --prefix= | |
| - name: Enable unprivileged userns (unshare) | |
| run: | | |
| sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0 | |
| - name: Build & Check | |
| run: | | |
| make distcheck || (find . -name test-suite.log -exec cat {} +; false) |