#!/bin/bash # objdiff - a small script for validating that a commit or series of commits # didn't change object code. # # Copyright 2014, Jason Cooper # # Licensed under the terms of the GNU GPL version 2 # usage example: # # $ git checkout COMMIT_A # $ # $ ./scripts/objdiff record path/to/*.o # # $ git checkout COMMIT_B # $ # $ ./scripts/objdiff record path/to/*.o # # $ ./scripts/objdiff diff COMMIT_A COMMIT_B # $ # And to clean up (everything is in .tmp_objdiff/*) # $ ./scripts/objdiff clean all # # Note: 'make mrproper' will also remove .tmp_objdiff SRCTREE=$(cd $(git rev-parse --show-toplevel 2>/dev/null); pwd) if [ -z "$SRCTREE" ]; then echo >&2 "ERROR: Not a git repository." exit 1 fi TMPD=$SRCTREE/.tmp_objdiff usage() { echo >&2 "Usage: $0 " echo >&2 " record " echo >&2 " diff " echo >&2 " clean all | " exit 1 } get_output_dir() { dir=${1%/*} if [ "$dir" = "$1" ]; then dir=. fi dir=$(cd $dir; pwd) echo $TMPD/$CMT${dir#$SRCTREE} } do_objdump() { dir=$(get_output_dir $1) base=${1##*/} dis=$dir/${base%.o}.dis [ ! -d "$dir" ] && mkdir -p $dir # remove addresses for a cleaner diff # http://dummdida.tumblr.com/post/60924060451/binary-diff-between-libc-from-scientificlinux-and $OBJDUMP -D $1 | sed "s/^[[:space:]]\+[0-9a-f]\+//" > $dis } dorecord() { [ $# -eq 0 ] && usage FILES="$*" CMT="`git rev-parse --short HEAD`" OBJDUMP="${CROSS_COMPILE}objdump" for d in $FILES; do if [ -d "$d" ]; then for f in $(find $d -name '*.o') do do_objdump $f done else do_objdump $d fi done } dodiff() { [ $# -ne 2 ] && [ $# -ne 0 ] && usage if [ $# -eq 0 ]; then SRC="`git rev-parse --short HEAD^`" DST="`git rev-parse --short HEAD`" else SRC="`git rev-parse --short $1`" DST="`git rev-parse --short $2`" fi DIFF="`which colordiff`" if [ ${#DIFF} -eq 0 ] || [ ! -x "$DIFF" ]; then DIFF="`which diff`" fi SRCD="$TMPD/$SRC" DSTD="$TMPD/$DST" if [ ! -d "$SRCD" ]; then echo >&2 "ERROR: $SRCD doesn't exist" exit 1 fi if [ ! -d "$DSTD" ]; then echo >&2 "ERROR: $DSTD doesn't exist" exit 1 fi $DIFF -Nurd $SRCD $DSTD } doclean() { [ $# -eq 0 ] && usage [ $# -gt 1 ] && usage if [ "x$1" = "xall" ]; then rm -rf $TMPD/* else CMT="`git rev-parse --short $1`" if [ -d "$TMPD/$CMT" ]; then rm -rf $TMPD/$CMT else echo >&2 "$CMT not found" fi fi } [ $# -eq 0 ] && usage case "$1" in record) shift dorecord $* ;; diff) shift dodiff $* ;; clean) shift doclean $* ;; *) echo >&2 "Unrecognized command '$1'" exit 1 ;; esac nge
diff options
context:
space:
mode:
authorSimon Horman <simon.horman@netronome.com>2017-01-30 16:19:02 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-30 16:42:09 -0500
commit040587af31228d82c52267f717c9fcdb65f36335 (patch)
treeb681c1594f967396fcf3ce80f17444183bb37900 /net/dns_resolver/Makefile
parent0d29ed28da63dd893395c343c7e78b078de93ceb (diff)
net/sched: cls_flower: Correct matching on ICMPv6 code
When matching on the ICMPv6 code ICMPV6_CODE rather than ICMPV4_CODE attributes should be used. This corrects what appears to be a typo. Sample usage: tc qdisc add dev eth0 ingress tc filter add dev eth0 protocol ipv6 parent ffff: flower \ indev eth0 ip_proto icmpv6 type 128 code 0 action drop Without this change the code parameter above is effectively ignored. Fixes: 7b684884fbfa ("net/sched: cls_flower: Support matching on ICMP type and code") Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dns_resolver/Makefile')