Keep log_in_vain Value

Ilker Ozupak ilker.ozupak at mail.emu.edu.tr
Tue Jun 15 12:28:29 PDT 2004


hello



On Tuesday 15 June 2004 21:10, Matt "Cyber Dog" LaPlante wrote:
> > -----Original Message-----
> > From: David Fuchs [mailto:david at davidfuchs.ca]
> > Sent: Tuesday, June 15, 2004 2:07 PM
> > To: Matt "Cyber Dog" LaPlante
> > Cc: freebsd-questions at freebsd.org
> > Subject: Re: Keep log_in_vain Value
> >
> > Matt "Cyber Dog" LaPlante wrote:
> > > Ah, grep saves the day again.  It was being turned on in rc.network.
> > > Thanks.
> >
> > You sure it wasn't being turned on in rc.conf instead?  Anything else
> > would mean that someone was messing with rc.network or
> > /etc/default/rc.conf, which really should be left alone.
> >
> > --
> > Thanks,
> > -David Fuchs BCIS (david at davidfuchs.ca)
> >
> > WWW:    http://www.davidfuchs.ca/
> > MSN:    david at davidfuchs.ca
> > PGP:    http://www.davidfuchs.ca/aboutme/433EEC91.pgp
>
> I'm positive...there is no log_in_vain entry in rc.conf.  It only appears
> in rc.network, where both tcp and udp were set to 1.
>
> -
> Matt
>
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"


I am using 4.8

i think it was a problem with rc.network.
even it says 

log_in_vain="0"  # >=1 to log connects to ports w/o listeners.

in /etc/defaults/rc.conf.

rc.network is

<code 1>
network_pass4() {
        echo -n 'Additional TCP options:'
        case ${log_in_vain} in
        [Nn][Oo] | '')
                ;;
        *)
                echo -n ' log_in_vain=YES'
                sysctl -w net.inet.tcp.log_in_vain=1 >/dev/null
                sysctl -w net.inet.udp.log_in_vain=1 >/dev/null
                ;;
        esac

        echo '.'
        network_pass4_done=YES
}
</code>

this is fixed in stable as far as i see.
<code 2>
network_pass4() {
        echo -n 'Additional TCP options:'
        case ${log_in_vain} in
        [Nn][Oo] | '')
                log_in_vain=0
                ;;
        [Yy][Ee][Ss])
                log_in_vain=1
                ;;
        [0-9]*)
                ;;
        *)
                echo " invalid log_in_vain setting: ${log_in_vain}"
                log_in_vain=0
                ;;
        esac

        if [ "${log_in_vain}" -ne 0 ]; then
                echo -n " log_in_vain=${log_in_vain}"
                sysctl net.inet.tcp.log_in_vain="${log_in_vain}" >/dev/null
                sysctl net.inet.udp.log_in_vain="${log_in_vain}" >/dev/null
        fi

        echo '.'
        network_pass4_done=YES
}
</code>

in code 1 log_in_vain=* results it to be log_in_vain=1
if it is not NO 

in code 2 log_in_vain="0" works as predicted ...

solution :

1 - put "log_in_vain="NO" into /etc/rc.conf
2 - modify your rc.network --- 

i did the second for my box and gone to single user 
and back to multiuser and there was no problem ..

Ps : code 2 is from src/etc/rc.network and 1 is 4.8's version
--
IO




More information about the freebsd-questions mailing list