exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

raw_ip.c.diff

raw_ip.c.diff
Posted May 4, 2000
Authored by s0ftpj, Pigpen | Site s0ftpj.org

IP_HDRINCL protection beta version 1.

SHA-256 | 7aa4377e96ae6d5a56e9a8b54c43ebb66246e4eb4db2d225719debea79ca60dc

raw_ip.c.diff

Change Mirror Download
50a51,73
> /*
> * COFFEE WARE LICENSE - diff for /sys/netinet/raw_ip.c
> *
> * IP_HDRINCL protection beta version 1
> *
> * Note: This type of protection can be implemented as a loadable kernel
> * module...
> *
> * This version requires that you recompile your kernel
> * Added options are:
> *
> * option IPHDR_MON -> to monitor IP_HDRINCL
> * option NO_IPHDR -> to deny it!
> *
> * Important: the second option requires the first!
> *
> * A lkm which monitors setsockopt() syscall can be also required to:
> * deadhead@sikurezza.org or pigpen@s0ftpj.org with Subject:
> * LKM FOR OpenBSD VERSION X.X -> where X.XX... is your version
> *
> * This diff was tested on a 2.6 kernel
> */
>
71a95,98
> #ifdef IPHDR_MON
> #include <sys/syslog.h>
> #endif
>
271c298,314
< else if (*mtod(*m, int *))
---
> else if (*mtod(*m, int *)) {
> #ifdef IPHDR_MON
> log(LOG_INFO,"IP_HDRINCL detected!\n");
> #endif
>
> #ifdef NO_IPHDR
> log(LOG_INFO,"Kernel doesn't permit it!\n");
>
> /* This if is false in general, I suppose OpenBSD kernel doesn't set IP_HDRINCL
> with value = 1 as default (Linux for example does it, see lkm by fusys) */
>
> if((inp->inp_flags & INP_HDRINCL)) {
> log(LOG_INFO,"Kernel put it to 1 ");
> log(LOG_INFO,"IP_HDRINCL disabled!\n");
> inp->inp_flags &= ~INP_HDRINCL;
> }
> #else
273c316,317
< else
---
> #endif
> } else
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close