Changeset 113 for branches


Ignore:
Timestamp:
04/26/07 22:33:49 (18 years ago)
Author:
psmith
Message:

Added allow-ips to ip-authorisation

Location:
branches/home/psmith/restructure/src/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/home/psmith/restructure/src/io/ip-authorisation.lisp

    r111 r113  
    3636  (format t "Loaded allowed ips:~A~% " +ip-list+))
    3737
     38;(allow-ips '("127.0.0.1"))
     39(defun allow-ips (ip-list)
     40  "Add each ip in the allow ips list to our list"
     41  (dolist (item ip-list)
     42    (when (not (check-ip-str item)) (push item +ip-list+))))
     43
     44
     45(defun check-ip-str(ip-string)
     46  (member ip-string +ip-list+ :test 'string-equal))
     47
    3848(defun check-ip (async-fd)
    3949  (with-slots (remote-host) (socket async-fd)
    4050    (let ((str-rep (format nil "~{~a~^.~}" (reverse remote-host))))
    4151      (format t "ip-authorisation:check-ip ~A ~A~%" str-rep +ip-list+)
    42       (member str-rep +ip-list+ :test 'string-equal))))
     52      (check-ip-str str-rep))))
  • TabularUnified branches/home/psmith/restructure/src/io/nio-package.lisp

    r110 r113  
    4242
    4343             ;;ip-authorisation
    44              check-ip load-ips
     44             check-ip load-ips allow-ips
    4545             
    4646             ;;nodes
Note: See TracChangeset for help on using the changeset viewer.