On Tue, 12 Dec 2000, Alexandr Belonogov wrote:
> ����� �� ������ ��������� 12 ������� 2000 �. [EMAIL PROTECTED]
>
> ������������, Igor!
> >> � ����� ��� ���� DNS ���� � ������ local.domain
> >> Igor> ��� ��� �������������? ����� ������������ ������ ������ � ���� ������?
> >> ��.
> Igor> � � ������ - �����?
> � ������ �� ������ ��������� �� �����.
> � �������� ���� ���������� ��� ���
> acl BADUSER src_ip 192.168.0.1 - ��������
>
> acl BADUSER ????? alex.local.domen - ��� �������� ������
> ��������, ����� ���� ����������� ���������� ������. ��� ����� � ������
�������. � ������ �� ����� ����� ��� alex.local.domen �� ���-�� ����������.
����������, ���������� ��, ��� � ������.
��� ������ ���� src_ip.
> ������ �������?
>
>
> � ���������� �����������, ��������� ���������.
> Home page: http://bw-azov.narod.ru
> E-mail: [EMAIL PROTECTED]
> ICQ: 49510725
>
>
> =====================================================================
> If you would like to unsubscribe from this list send message to
> [EMAIL PROTECTED] with "unsubscribe oops" in message body.
> Archive is accessible on http://www.paco.net/oops/
>
Igor Khasilev |
PACO Links, igor at paco dot net |
Index: acl.c
===================================================================
RCS file: /usr/local/cvs/oops/src/acl.c,v
retrieving revision 1.16
diff -c -r1.16 acl.c
*** acl.c 2000/11/20 09:37:00 1.16
--- acl.c 2000/12/12 16:23:58
***************
*** 726,734 ****
verb_printf("SRC_IP: %s\n", data);
t = data;
while ( (p = (char*)strtok_r(t, "\t \n", &tptr)) != 0 ) {
! char *slash = NULL, masklen, *tt, *pp, *ttptr;
! int net = 0, i = 24;
! struct cidr_net *new;
t = NULL;
verb_printf("SRC: %s\n", p);
--- 726,735 ----
verb_printf("SRC_IP: %s\n", data);
t = data;
while ( (p = (char*)strtok_r(t, "\t \n", &tptr)) != 0 ) {
! char *slash = NULL, masklen, *tt, *pp, *ttptr;
! int net = 0, i = 24;
! struct cidr_net *new;
! struct sockaddr_in hostsa;
t = NULL;
verb_printf("SRC: %s\n", p);
***************
*** 746,751 ****
--- 747,759 ----
i -= 8;
}
if ( slash ) *slash = '/';
+ else {
+ /* this is hostname */
+ bzero(&hostsa, sizeof(hostsa));
+ if ( !str_to_sa(p, (struct sockaddr*)&hostsa) ) {
+ net = hostsa.sin_addr.s_addr;
+ }
+ }
verb_printf("NET: %0x/%d\n", net, masklen);
new = malloc(sizeof(*new));
if ( !new ) continue;